Module
Data.Variant.Internal
- Package
- purescript-variant
- Repository
- natefaubion/purescript-variant
#VariantCase Source
data VariantCase :: Type
#VariantFCase Source
data VariantFCase :: Type -> Type
#VariantTags Source
class VariantTags (rl :: RowList) where
Members
variantTags :: RLProxy rl -> List String
Instances
VariantTags Nil
(VariantTags rs, IsSymbol sym) => VariantTags (Cons sym a rs)
#Contractable Source
class Contractable gt lt where
Members
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
#VariantMatchCases Source
class VariantMatchCases (rl :: RowList) (vo :: Row Type) b | rl -> vo b
Instances
(VariantMatchCases rl vo' b, Cons sym a vo' vo, TypeEquals k (a -> b)) => VariantMatchCases (Cons sym k rl) vo b
VariantMatchCases Nil () b
#VariantFMatchCases Source
class VariantFMatchCases (rl :: RowList) (vo :: Row Type) a b | rl -> vo a b
Instances
(VariantFMatchCases rl vo' a b, Cons sym (FProxy f) vo' vo, TypeEquals k (f a -> b)) => VariantFMatchCases (Cons sym k rl) vo a b
VariantFMatchCases Nil () a b
#lookupEq Source
lookupEq :: List String -> List (VariantCase -> VariantCase -> Boolean) -> VariantRep VariantCase -> VariantRep VariantCase -> Boolean
#lookupOrd Source
lookupOrd :: List String -> List (VariantCase -> VariantCase -> Ordering) -> VariantRep VariantCase -> VariantRep VariantCase -> Ordering
#lookupPred Source
lookupPred :: forall a. VariantRep a -> List String -> List (BoundedDict a) -> List (BoundedEnumDict a) -> Maybe (VariantRep a)
#lookupSucc Source
lookupSucc :: forall a. VariantRep a -> List String -> List (BoundedDict a) -> List (BoundedEnumDict a) -> Maybe (VariantRep a)
#lookupCardinality Source
lookupCardinality :: forall a. List (BoundedEnumDict a) -> Int
#lookupFromEnum Source
lookupFromEnum :: forall a. VariantRep a -> List String -> List (BoundedEnumDict a) -> Int
#lookupToEnum Source
lookupToEnum :: forall a. Int -> List String -> List (BoundedEnumDict a) -> Maybe (VariantRep a)
#BoundedDict Source
type BoundedDict a = { bottom :: a, top :: a }
#impossible Source
impossible :: forall a. String -> a