Module

Kishimen

Package
purescript-kishimen
Repository
justinwoo/purescript-kishimen

#genericSumToVariant Source

genericSumToVariant :: forall r rep a. Generic a rep => GenericSumToVariant rep r => a -> Variant r

Convert a generic sum into a variant

#variantToGenericSum Source

variantToGenericSum :: forall r rep a. Generic a rep => GenericSumToVariant rep r => Variant r -> a

Convert a variant into a generic sum, where the type of the sum determines the type of the variant, because you could not construct the sum otherwise. This also means that we can recover from the alternative introduced when expanding and contracting the Variant rows.

#GenericSumToVariant Source

class GenericSumToVariant rep (r :: Row Type) | rep -> r where

Give Generic Sum Rep, get Variant

Members

Instances

#GenericSumToVariantArg Source

class GenericSumToVariantArg rep out | rep -> out where

Give Generic Rep, get Type

Members

Instances

Modules
Kishimen