Module

Type.Row

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

#RProxy Source

data RProxy (row :: Row Type)

Constructors

#RowLacking Source

class RowLacking (entry :: Type) (key :: Symbol) (typ :: Type) (row :: Row Type) | entry typ -> key row

If you get "No type class instance was found" for this class, then your row shouldn't contain the label key.

Instances

#RowLacks Source

class RowLacks (key :: Symbol) (row :: Row Type) 

Encodes the constraint that a given row does not contain a specific key.

#RowList Source

data RowList :: Type

A type-level list representation of a row

#Cons Source

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

Instances

#RLProxy Source

data RLProxy (rowList :: RowList)

Constructors

#RowToList Source

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

Extract the collection of entries in a closed row of types. The list of entries is sorted by label and preserves duplicates. The inverse of this operation is ListToRow. Solved by the compiler.

#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