[Haskell-cafe] Haskell 2010 report nit?
Tom Ellis
tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk
Mon Dec 16 10:09:17 UTC 2019
On Mon, Dec 16, 2019 at 02:36:48AM -0500, Viktor Dukhovni wrote:
> > On Dec 16, 2019, at 2:32 AM, Tom Ellis <tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk> wrote:
> >
> >>> These examples illustrate the difference in pattern matching between types defined by data and newtype:
> >>>
> >>> (\ (N True) -> True) ⊥ ⇒ ⊥
> >>> (\ (D True) -> True) ⊥ ⇒ ⊥
> >>> (\ ~(D True) -> True) ⊥ ⇒ True
> >>>
[...]
> > I think what you're saying is that this doesn't show a difference because
> >
> > (\ ~(N True) -> True) ⊥ ⇒ True
>
> Yes, because of that, and also because even if it were otherwise, it is
> not one of the examples. :-( But indeed the expressions used in the
> examples behave indistinguishably for "N" and "D". So the examples
> don't seem to make the intended point.
I agree that's very strange!
More information about the Haskell-Cafe
mailing list