Module
Type.RowList
- Package
- purescript-typelevel-prelude
- Repository
- purescript/purescript-typelevel-prelude
#RowListRemove Source
class RowListRemove :: forall k. Symbol -> RowList k -> RowList k -> Constraint
class RowListRemove label input output | 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 tailOutput (Cons key head tailOutput) output) => RowListRemove label (Cons key head tail) output
#RowListSet Source
class RowListSet :: forall k. Symbol -> k -> RowList k -> RowList k -> Constraint
class RowListSet label typ input output | label typ input -> output
Add a label to a RowList after removing other occurences.
Instances
(TypeEquals label label', TypeEquals typ typ', RowListRemove label input lacking) => RowListSet label typ input (Cons label' typ' lacking)
#RowListNub Source
class RowListNub :: forall k. RowList k -> RowList k -> Constraint
class RowListNub input output | input -> output
Remove label duplicates, keeps earlier occurrences.
Instances
RowListNub Nil Nil
(TypeEquals label label', TypeEquals head head', TypeEquals nubbed nubbed', RowListRemove label tail removed, RowListNub removed nubbed) => RowListNub (Cons label head tail) (Cons label' head' nubbed')
#RowListAppend Source
class RowListAppend :: forall k. RowList k -> RowList k -> RowList k -> Constraint
class RowListAppend lhs rhs out | lhs rhs -> out
Instances
(TypeEquals rhs out) => RowListAppend Nil rhs out
(RowListAppend tail rhs out', TypeEquals (Cons label head out') out) => RowListAppend (Cons label head tail) rhs out