
15 Oct
2005
15 Oct
'05
1:07 p.m.
Wolfgang Jeltsch wrote:
This is not true. With newtype, A _|_ is _|_, with data, A _|_ is not _|_.
It's probably more helpful to explain this in terms of a program that exhibits different behavior in the two cases: case error "data" of A x -> "newtype"
But as far as I know, the above newtype declaration is equivalent to this:
data A = A !Int
Nope: case A (error "data!") of A x -> "data or newtype" -- Ben