Module
LabeledData.VariantLike.Class
- Package
- purescript-labeled-data
- Repository
- thought2/purescript-labeled-data
#VariantLike Source
class VariantLike :: Type -> Row Type -> Constraint
class VariantLike a r | a -> r where
Members
toVariant :: a -> Variant r
fromVariant :: Variant r -> a
Instances
VariantLike (Variant r) r
(GenericVariantLike DefaultTransform (Tuple a b) r) => VariantLike (Tuple a b) r
VariantLike Boolean BooleanRow
(GenericVariantLike DefaultTransform (Either a b) (EitherRow a b)) => VariantLike (Either a b) (EitherRow a b)
(GenericVariantLike DefaultTransform (Maybe a) (MaybeRow a)) => VariantLike (Maybe a) (MaybeRow a)
#BooleanRow Source
type BooleanRow :: Row Type
type BooleanRow = (false :: Unit, true :: Unit)
Instances
#BooleanV Source
type BooleanV = Variant BooleanRow
#EitherRow Source
type EitherRow :: Type -> Type -> Row Type
type EitherRow a b = (left :: a, right :: b)
Instances
(GenericVariantLike DefaultTransform (Either a b) (EitherRow a b)) => VariantLike (Either a b) (EitherRow a b)
#MaybeRow Source
type MaybeRow :: Type -> Row Type
type MaybeRow a = (just :: a, nothing :: Unit)
Instances
(GenericVariantLike DefaultTransform (Maybe a) (MaybeRow a)) => VariantLike (Maybe a) (MaybeRow a)