compstrat-0.1.0.2: Strategy combinators for compositional data types

Safe HaskellNone
LanguageHaskell98

Data.Comp.Multi.Strategy.Classification

Description

This module contains typeclasses and operations allowing dynamic casing on sorts.

Synopsis

Documentation

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

Methods

dyncase :: f b -> Maybe (b :~: a) Source

Determine whether a node has sort a

Instances

DynCase (K a) b 
(KDynCase f l, DynCase a l) => DynCase (Cxt h f a) l 

class KDynCase f a where Source

An instance KDynCase f a defines an instance DynCase (Term f) a

Methods

kdyncase :: forall e b. DynCase e a => f e b -> Maybe (b :~: a) Source

Instances

KDynCase f a 
(KDynCase f l, KDynCase g l) => KDynCase ((:+:) * f g) l 
KDynCase f l => KDynCase ((:&:) * f a) l 

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