open-adt-1.0: Open algebraic data types.

CopyrightCopyright (c) Jordan Woehr 2018
LicenseBSD
MaintainerJordan Woehr
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.OpenADT.VariantsF

Description

This module lifts functions from row-types on Var to the VarF type. All functions in this module are named as their row-types version with an F appended.

Synopsis

Documentation

diversifyF :: forall r' x r. (ApplyRow x r .\/ ApplyRow x r') ApplyRow x (r .\/ r') => VarF r x -> VarF (r .\/ r') x Source #

Like diversify but specialised for VarF.

Since: 1.0.0

trialF :: ((ApplyRow x r .- l) ApplyRow x (r .- l), KnownSymbol l) => VarF r x -> Label l -> Either (ApplyRow x r .! l) (VarF (r .- l) x) Source #

Like trial but specialised for VarF.

Since: 1.0.0

multiTrialF :: forall u v x. ((ApplyRow x v .\\ ApplyRow x u) ApplyRow x (v .\\ u), AllUniqueLabels (ApplyRow x u), Forall (ApplyRow x (v .\\ u)) Unconstrained1) => VarF v x -> Either (VarF u x) (VarF (v .\\ u) x) Source #

Like multiTrial but specialised for VarF.

Since: 1.0.0

eraseF :: forall c r x b. Forall (ApplyRow x r) c => (forall a. c a => a -> b) -> VarF r x -> b Source #

Like erase but specialised for VarF.

Since: 1.0.0

eraseWithLabelsF :: forall c r x s b. (Forall (ApplyRow x r) c, IsString s) => (forall a. c a => a -> b) -> VarF r x -> (s, b) Source #

Like eraseWithLabels but specialised for VarF.

Since: 1.0.0

caseonF :: Switch (ApplyRow x v) r y => Rec r -> VarF v x -> y Source #

Like caseon but specialised for VarF.

Since: 1.0.0

switchF :: Switch (ApplyRow x v) r y => VarF v x -> Rec r -> y Source #

Like switch but specialised for VarF.

Since: 1.0.0