haskell-cafe@haskell.org
[Top] [All Lists]

Re: [Haskell-cafe] nice simple problem for someone struggling....

Subject: Re: [Haskell-cafe] nice simple problem for someone struggling....
From: Jules Bean
Date: Fri, 21 Dec 2007 19:38:40 +0000
David Menendez wrote:
That's a reasonable thing to assume. It just happens that Haskell
doesn't work that way. There's an asymmetry between constructing and pattern-matching, and it's one that many people have complained about.

With GADTs turned on (-XGADTS in 6.8, -fglasgow-exts in 6.6) pattern matchings will give rise to class contexts as you would naively expect.

Contexts on constructors aren't actualy haskell98, it is a bug that GHC 6.6 accepts them without any extensions being activated. Or that's my understanding, see http://hackage.haskell.org/trac/ghc/ticket/1901

Jules

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>