Module
Data.Variant.Internal
- Package
- purescript-variant
- Repository
- natefaubion/purescript-variant
#FProxy Source
data FProxy (a :: Type -> Type)Proxy for a Functor.
Constructors
Instances
(VariantFMatchEachCase v r a res) => VariantFMatchEachCase (Cons sym (FProxy f) v) (Cons sym (f a -> res) r) a res
#VariantCase Source
data VariantCase :: Type#VariantTags Source
class VariantTags (rl :: RowList) whereMembers
variantTags :: RLProxy rl -> List String
Instances
VariantTags Nil(VariantTags rs, IsSymbol sym) => VariantTags (Cons sym a rs)
#Contractable Source
class Contractable gt lt whereMembers
contractWith :: forall a f. Alternative f => RProxy gt -> RProxy lt -> String -> a -> f a
Instances
(RowToList lt ltl, Union lt a gt, VariantTags ltl) => Contractable gt lt
#VariantRecordMatching Source
class VariantRecordMatching (variant :: Row Type) (record :: Row Type) result | -> variant record resultType class that matches a row for a record that will eliminate a row for
a variant, producing a result of the specified type. Just a wrapper for
RLMatch to convert RowToList and vice versa.
Instances
(RowToList variant vlist, RowToList record rlist, VariantMatchEachCase vlist rlist result, ListToRow vlist variant, ListToRow rlist record) => VariantRecordMatching variant record result
#VariantMatchEachCase Source
class VariantMatchEachCase (vlist :: RowList) (rlist :: RowList) result | vlist -> rlist result, rlist -> vlist resultChecks that a RowList matches the argument to be given to the function
in the other RowList with the same label, such that it will produce the
result type.
Instances
VariantMatchEachCase Nil Nil r(VariantMatchEachCase v r res) => VariantMatchEachCase (Cons sym a v) (Cons sym (a -> res) r) res
#VariantFRecordMatching Source
class VariantFRecordMatching (variant :: Row Type) (record :: Row Type) typearg result | -> variant record typearg resultInstances
(RowToList variant vlist, RowToList record rlist, VariantFMatchEachCase vlist rlist typearg result, ListToRow vlist variant, ListToRow rlist record) => VariantFRecordMatching variant record typearg result
#VariantFMatchEachCase Source
class VariantFMatchEachCase (vlist :: RowList) (rlist :: RowList) typearg result | vlist -> rlist typearg result, rlist -> vlist typearg resultChecks that a RowList matches the argument to be given to the function
in the other RowList with the same label, such that it will produce the
result type.
Instances
VariantFMatchEachCase Nil Nil a r(VariantFMatchEachCase v r a res) => VariantFMatchEachCase (Cons sym (FProxy f) v) (Cons sym (f a -> res) r) a res
#lookupEq Source
lookupEq :: List String -> List (VariantCase -> VariantCase -> Boolean) -> Tuple String VariantCase -> Tuple String VariantCase -> Boolean#lookupOrd Source
lookupOrd :: List String -> List (VariantCase -> VariantCase -> Ordering) -> Tuple String VariantCase -> Tuple String VariantCase -> OrderingRe-exports from Data.Record.Unsafe
#unsafeGet
unsafeGet :: forall a r. String -> Record r -> a