compdata-0.3: Compositional Data Types

Portabilitynon-portable (GHC Extensions)
Stabilityexperimental
MaintainerTom Hvitved <hvitved@diku.dk>

Data.Comp.Param.Any

Description

This module defines the empty data type Any, which is used to emulate parametricity ("poor mans parametricity").

Synopsis

Documentation

data Any Source

The empty data type Any is used to emulate parametricity ("poor mans parametricity").

Instances

Ditraversable (->) [] Any 
Ditraversable (->) Maybe Any

Functions of the type Any -> Maybe a can be turned into functions of type Maybe (Any -> a). The empty type Any ensures that the function is parametric in the input, and hence the Maybe monad can be pulled out.

Ditraversable (->) (Either e) Any 
Ditraversable (->) m Any => Ditraversable (->) (ListT m) Any 
(Error e, Ditraversable (->) m Any) => Ditraversable (->) (ErrorT e m) Any 
Ditraversable (->) m Any => Ditraversable (->) (StateT s m) Any 
(Monoid w, Ditraversable (->) m Any) => Ditraversable (->) (WriterT w m) Any 
(Monoid w, Ditraversable (->) m Any) => Ditraversable (->) (RWST r w s m) Any 
(Difunctor f, EqD f) => Eq (Term f)

Equality on terms.

(Difunctor f, OrdD f) => Ord (Term f)

Ordering of terms.

(Difunctor f, ShowD f) => Show (Term f)

Printing of terms.