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
- Re: Haskell 1.3 (newtype) wadler
- Re: Haskell 1.3 (newtype) Ryszard Kubiak
- Re: Haskell 1.3 (newtype) Simon L Peyton Jones
- Re: Haskell 1.3 (newtype) wadler
- Re: Haskell 1.3 (newtype) Sebastian Hunt
- Re: Haskell 1.3 (newtype) Lennart Augustsson
- Re: Haskell 1.3 (newtype) Sebastian Hunt
- Re: Haskell 1.3 (newtype) Simon L Peyton Jones
- Re: Haskell 1.3 (newtype) wadler
- Re: Haskell 1.3 (newtype) Sebastian Hunt
- Re: Haskell 1.3 (newtype) Simon L Peyton Jones
- Re: Haskell 1.3 (newtype) Sebastian Hunt
- Re: Haskell 1.3 (newtype) Ryszard Kubiak
- Re: Haskell 1.3 (newtype) wadler