[Haskell-cafe] computational overhead of the "data" declarations
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...
More information about the Haskell-Cafe