Module
LabeledData.VariantLike.Generic
- Package
- purescript-labeled-data
- Repository
- thought2/purescript-labeled-data
#GenericVariantLike Source
class GenericVariantLike :: forall k. k -> Type -> Row Type -> Constraint
class GenericVariantLike tok a r | a -> r where
Members
genericToVariant :: Proxy tok -> a -> Variant r
genericFromVariant :: Proxy tok -> Variant r -> a
Instances
(Generic a rep, RepVariantLike tok rep r) => GenericVariantLike tok a r
#RepVariantLike Source
class RepVariantLike :: forall k. k -> Type -> Row Type -> Constraint
class RepVariantLike tok rep r | rep -> r where
Members
repToVariant :: Proxy tok -> rep -> Variant r
repFromVariant :: Proxy tok -> Variant r -> rep
Instances
(Cons sym' args' () r, IsSymbol sym', TransformEntry tok sym sym' args args') => RepVariantLike tok (Constructor sym args) r
(RepVariantLike tok b r2, Union r2 tr r, Cons sym' args' r2 r, IsSymbol sym', TransformEntry tok sym sym' args args') => RepVariantLike tok (Sum (Constructor sym args) b) r
#genericFromVariant' Source
genericFromVariant' :: forall tok a r. GenericVariantLike tok a r => tok -> Proxy (Variant r) -> Proxy a
#genericToVariant' Source
genericToVariant' :: forall tok a r. GenericVariantLike tok a r => tok -> Proxy a -> Proxy (Variant r)