Module

Type.RowList

Package
purescript-typelevel-prelude
Repository
purescript/purescript-typelevel-prelude

#ListToRow Source

class ListToRow (list :: RowList) (row :: Row Type) | list -> row

Convert a RowList to a row of types. The inverse of this operation is RowToList.

Instances

#RowListRemove Source

class RowListRemove (label :: Symbol) (input :: RowList) (output :: RowList) | label input -> output

Remove all occurences of a given label from a RowList

Instances

#RowListSet Source

class RowListSet (label :: Symbol) (typ :: Type) (input :: RowList) (output :: RowList) | label typ input -> output

Add a label to a RowList after removing other occurences.

Instances

#RowListNub Source

class RowListNub (input :: RowList) (output :: RowList) | input -> output

Remove label duplicates, keeps earlier occurrences.

Instances

#RowListAppend Source

class RowListAppend (lhs :: RowList) (rhs :: RowList) (out :: RowList) | lhs rhs -> out

Instances

Re-exports from Prim.RowList

#Nil

data Nil :: RowList

The empty RowList.

#Cons

data Cons :: Symbol -> Type -> RowList -> RowList

Constructs a new RowList from a label, a type, and an existing tail RowList. E.g: Cons "x" Int (Cons "y" Int Nil).

#RowToList

class RowToList (row :: Row Type) (list :: RowList) | row -> list

Compiler solved type class for generating a RowList from a closed row of types. Entries are sorted by label and duplicates are preserved in the order they appeared in the row.

#RowList

data RowList :: Type

A type level list representation of a row of types.

Re-exports from Type.Data.RowList

#RLProxy Source

data RLProxy (rowlist :: RowList)

A proxy data type whose type parameter is a type of kind RowList.

Commonly used for specialising a function with a quantified type.

Constructors