NewType ( Newtype ) Is a specialized data type declaration. Such that it contains only one constructor and a field. 3r3774. 3r3r7787.
newtype Foo a = Bar a
newtype Id = MkId Word
3r33737. 3r33737. 3r3774. 3r3r7787. 3r3774. 3r3r7787. What is the difference from data data type? 3r3774. 3r3r7787.
data Foo a = Bar a
data Id = MkId Word
3r33737. 3r33737. 3r3774. 3r3r7787. The main specificity of 3r3777. newtype [/b] consists in the fact that it consists of the same parts as its only field. More precisely, it differs from the original at the type level, but it has the same memory representation...