Module

Kishimen

#genericSumToVariant

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

Convert a generic sum into a variant

#variantToGenericSum

variantToGenericSum :: forall a rep r. 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

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

Give Generic Sum Rep, get Variant

Members

Instances

#GenericSumToVariantArg

class GenericSumToVariantArg rep out | rep -> out where

Give Generic Rep, get Type

Members

Instances

Modules