
28 Oct
2008
28 Oct
'08
3:13 p.m.
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" declrations?