[Haskell-cafe] computational overhead of the "data" declarations

Daryoush Mehrtash dmehrtash at gmail.com
Tue Oct 28 15:13:11 EDT 2008

I Haskell School of Expression  (p172), it says:

A newtype declaration is just like a data declaration, except that it can
> only be used to defined data types with single constructor.  The new data
> type is different from the analogous one created by a data declaration, in
> that there is no computational overhead in having the constructor.... You
> can think of a newtype as defining  a "new type" with exactly the same
> structure, behaviour, and performance as the underlying type.

What is (or where do you see) the computational overhead of the "data"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081028/0179c5f3/attachment.htm

More information about the Haskell-Cafe mailing list