Annotations-0.2: Constructing, analyzing and destructing annotated trees

Safe HaskellSafe-Infered

Annotations.MultiRec.Any

Description

Pattern functors existentially quantified in their top-level index type ix.

Synopsis

Documentation

data Any s whereSource

A value of some type in data family s, together with its witness.

Constructors

Any :: s ix -> ix -> Any s 

Instances

ShowFam s => Show (Any s) 

mkAny :: El s ix => ix -> Any sSource

Helper constructor.

matchAny :: forall s a. EqS s => s a -> Any s -> Maybe aSource

Unify an Any with an a.

data AnyF s f whereSource

A value of some type in data family s wrapped in an f, together with its witness.

Constructors

AnyF :: s ix -> f ix -> AnyF s f 

mkAnyF :: El s ix => r ix -> AnyF s rSource

Helper constructor.

matchAnyF :: forall s f a. EqS s => s a -> AnyF s f -> Maybe (f a)Source

Unify an AnyF with an f a.

unwrapAnyF :: (forall ix. f ix -> ix) -> AnyF s f -> Any sSource

Removes the value from its functor f.

($?) :: (forall b. s b -> f b -> a) -> AnyF s f -> aSource

Unwrap an AnyF and pass it to a function.