Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | generics@haskell.org |
Summary: Functions for extracting meta-information about the representation.
Embedding-Projection Pair
class HasEP a b | a -> b whereSource
A class to reveal the embedding-projection pair for a given datatype and its isomorphic representation type.
HasEP Bool BoolS | |
HasEP () Tuple0S | |
HasEP [a] (ListS a) | |
Integral a => HasEP (Ratio a) (RatioS a) | |
HasEP (Maybe a) (MaybeS a) | |
HasEP (Either a b) (EitherS a b) | |
HasEP (a, b) (Tuple2S a b) | |
HasEP (a, b, c) (Tuple3S a b c) | |
HasEP (a, b, c, d) (Tuple4S a b c d) | |
HasEP (a, b, c, d, e) (Tuple5S a b c d e) | |
HasEP (a, b, c, d, e, f) (Tuple6S a b c d e f) | |
HasEP (a, b, c, d, e, f, h) (Tuple7S a b c d e f h) |
Constructor Description
The type of a generic function that takes one value and returns an optional constructor description.
Con | |
|
conDescr :: Rep Con a => a -> Maybe ConDescrSource
Returns a constructor description if the value is not a primitive. The
argument is not evaluated and may be undefined
.
Label Descriptions
The type of a generic function that takes a boolean to limit recursion and a value and returns a list of label descriptions for that constructor.