[Haskell-cafe] data vs type
Daniel Carrera
daniel.carrera at zmsl.com
Wed Jan 4 09:24:15 EST 2006
Ketil Malde wrote:
>>I'm trying to figure out how 'data' and 'type'.
>
> How data and type...what? :-)
oops... "work" :)
> Generally, 'type' introduces type synonyms, i.e. just gives a new name
> to an existing type, while 'data' defines new (algebraic) types.
>
> So you can use
>
> type Name = String
Ah. Thanks.
> Did that help?
Yes, a lot. :)
Cheers,
Daniel.
--
/\/`) http://oooauthors.org
/\/_/ http://opendocumentfellowship.org
/\/_/
\/_/ I am not over-weight, I am under-tall.
/
More information about the Haskell-Cafe
mailing list