Hi to anyone reading this. i'm still strugling a bit with data type declarations.

The was i understand it is that if i delcare a new data type:

data myType = myType a | b | c

The constructor is of type a -> myType. can it also be of type b -> myType, or c -> myType ?

What I am reall strugling to understand is if i declare a new data type as such

data myType = a | b | c

That a, b & c are all contructors for the new data type, but, what exactly does this mean ? what, in this case is the type of the constructor(s). And what do a, b & c have to be in this instance ? functions or ??. This all has me very confused.

not sure if i'm making sense :) ...

ANY help is much appreciated :)

Cheers,

Patrick



Hot chart ringtones and polyphonics. Click here