Why is there “data” and “newtype” in Haskell? [duplicate]
Both newtype and the single-constructor data introduce a single value constructor, but the value constructor introduced by newtype is strict and the value constructor introduced by data is lazy. So if you have data D = D Int newtype N = N Int Then N undefined is equivalent to undefined and causes an error when … Read more