Simon offers a compelling reason to make newtype distinct from a strict
datatype with one constructor.  And a semantics to boot!  I withdraw my
objection.   -- P

PS.  The informal explanation might be modified to explain why
newtype must be distinct from a strict datatype.

strict datatype

        case Foo undefined of Foo _ -> True  =  undefined

newtype

        case Foo undefined of Foo _ -> True  =  True

The latter must be the right thing to do (as pointed out by Simon)
because removing Foo should not change the meaning:

        case undefined of _ -> True  =  True

Cheers,  -- P



Reply via email to