[Haskell-cafe] 3 level hierarchy of Haskell objects
es at ertes.de
Wed Aug 8 19:26:33 CEST 2012
Patrick Browne <patrick.browne at dit.ie> wrote:
> Gast  describes a 3 level hierarchy of Haskell objects using
> elementOf from set theory:
> value *elementOf* type *elementOf* class
This hierarchy is pretty arbitrary and quickly runs into problems with
some type system extensions. You can find out whether the barber of
Seville shaves himself.
A better hierarchial model is related to universes and uses type
relations (assuming a right-associative ':'):
value : type : kind : sort : ...
value : type : universe 0 : universe 1 : universe 2 : ...
A value is of a type. A type is of the first universe (kind). An n-th
universe is of the (n+1)-th universe.
Type classes can be modelled as implicit arguments.
> If we include super-classes would the following be an appropriate
> mathematical representation?
What is a superclass? What are the semantics?
Not to be or to be and (not to be or to be and (not to be or to be and
(not to be or to be and ... that is the list monad.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: not available
More information about the Haskell-Cafe