Type equivalency 2

Ashley Yakeley ashley@semantic.org
Thu, 6 Jun 2002 03:52:01 -0700


At 2002-06-06 03:38, Cagdas Ozgenc wrote:

>Then either -> is not a type constructor, 

(->) is a type constructor.

>or the concept of type
>constructors has to be divided into two : consuming type constructors, and
>producing type constructors.

Type constructors can do anything they like with their arguments. Here 
are some of kind (* -> *):

     newtype Holds a = MkHolds a

     data Ignores a = MkIgnores

     newtype Wants a = MkWants (a -> Bool)

     data List a = MkPairList a (List a) | MkEmptyList

     data Maybe a = Just a | Nothing

I don't think you can divide them up into two categories...

-- 
Ashley Yakeley, Seattle WA