Module
Type.RowList
- Package
- purescript-typelevel-prelude
- Repository
- purescript/purescript-typelevel-prelude
#RowListRemove Source
class RowListRemove (label :: Symbol) (input :: RowList) (output :: RowList) | label input -> output
Remove all occurences of a given label from a RowList
Instances
RowListRemove label Nil Nil
(RowListRemove label tail tailOutput, Equals label key eq, If eq (RLProxy tailOutput) (RLProxy (Cons key head tailOutput)) (RLProxy output)) => RowListRemove label (Cons key head tail) output
#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
(TypeEquals (SProxy label) (SProxy label'), TypeEquals typ typ', RowListRemove label input lacking) => RowListSet label typ input (Cons label' typ' lacking)
#RowListNub Source
class RowListNub (input :: RowList) (output :: RowList) | input -> output
Remove label duplicates, keeps earlier occurrences.
Instances
RowListNub Nil Nil
(TypeEquals (SProxy label) (SProxy label'), TypeEquals head head', TypeEquals (RLProxy nubbed) (RLProxy nubbed'), RowListRemove label tail removed, RowListNub removed nubbed) => RowListNub (Cons label head tail) (Cons label' head' nubbed')
#RowListAppend Source
class RowListAppend (lhs :: RowList) (rhs :: RowList) (out :: RowList) | lhs rhs -> out
Instances
(TypeEquals (RLProxy rhs) (RLProxy out)) => RowListAppend Nil rhs out
(RowListAppend tail rhs out', TypeEquals (RLProxy (Cons label head out')) (RLProxy out)) => RowListAppend (Cons label head tail) rhs out