[Haskell-cafe] 3 level hierarchy of Haskell objects

Ertugrul Söylemez es at ertes.de
Wed Aug 8 19:26:33 CEST 2012


Patrick Browne <patrick.browne at dit.ie> wrote:

> Gast [1] 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?


Greets,
Ertugrul

-- 
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...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120808/3aef073c/attachment.pgp>


More information about the Haskell-Cafe mailing list