| Copyright | (c) Erich Gut |
|---|---|
| License | BSD3 |
| Maintainer | zerich.gut@gmail.com |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
OAlg.Data.Constructable
Contents
Description
constructing values by there Form..
Constructable
class Exposable x => Constructable x where Source #
types with an associated form, which serves as a blueprint to construct a corresponding value.
A common setting for this structure is a module with a reducible type f
(see ) with public constructors - which serves as a form to be
filled out - and in the same module a type Reduciblee with a private constructor - lets say
E - to hold the reduced f. Than an implementation would be
make f = E (reduce f)
and
form (E f) = f
Property Let x be an instance of the class Constructable than holds:
For all x in x holds: .make (form x) == x
Instances
| Oriented x => Constructable (GLT x) Source # | |
| Entity x => Constructable (ProductSymbol x) Source # | |
Defined in OAlg.Entity.Product.ProductSymbol Methods make :: Form (ProductSymbol x) -> ProductSymbol x Source # | |
| Eq i => Constructable (Permutation i) Source # | |
Defined in OAlg.Entity.Sequence.Permutation Methods make :: Form (Permutation i) -> Permutation i Source # | |
| (Oriented a, Integral r) => Constructable (Product r a) Source # | |
| (Fibred a, Ord a, Semiring r, Commutative r) => Constructable (Sum r a) Source # | |
| Constructable (IsoOp s a b) Source # | |
| Constructable (IsoOpMap f s a b) Source # | |
cmap :: (Constructable x, Constructable y) => (Form x -> Form y) -> x -> y Source #
Exposable
class Exposable x where Source #
types with an associated form type and a function form which exposes its values
to its form.
Instances
| Exposable (GLT x) Source # | |
| Exposable (ProductSymbol x) Source # | |
Defined in OAlg.Entity.Product.ProductSymbol Associated Types type Form (ProductSymbol x) Source # Methods form :: ProductSymbol x -> Form (ProductSymbol x) Source # | |
| Exposable (Permutation i) Source # | |
Defined in OAlg.Entity.Sequence.Permutation Associated Types type Form (Permutation i) Source # Methods form :: Permutation i -> Form (Permutation i) Source # | |
| Exposable (Product r a) Source # | |
| Exposable (Sum r a) Source # | |
| Exposable (IsoOp s a b) Source # | |
| Exposable (IsoOpMap f s a b) Source # | |