compstrat-0.1.0.2: Strategy combinators for compositional data types
Data.Comp.Multi.Strategy.Classification
Description
This module contains typeclasses and operations allowing dynamic casing on sorts.
Synopsis
class DynCase f a where Source
This operation allows you to rediscover the label giving the sort of a term by inspecting the term. It is mainly used through the caseE and dynProj operators
caseE
dynProj
Methods
dyncase :: f b -> Maybe (b :~: a) Source
Determine whether a node has sort a
a
Instances
class KDynCase f a where Source
An instance KDynCase f a defines an instance DynCase (Term f) a
KDynCase f a
DynCase (Term f) a
kdyncase :: forall e b. DynCase e a => f e b -> Maybe (b :~: a) Source
dynProj :: forall f l l'. DynCase f l => f l' -> Maybe (f l) Source
caseE :: DynCase f a => E f -> Maybe (f a) Source
Inspect an existentially-quantified sort