Re: GADT Type Checking GHC 6.10 versus older GHC

2008-11-28 Thread Dominic Steinitz
Ignore my last email. I was accidentally using The Glorious Glasgow Haskell Compilation System, version 6.9.20080616 Mind you I am still having problems just not the same ones. I'll report back later. Dominic. ___ Glasgow-haskell-users mailing list

RE: GADT Type Checking GHC 6.10 versus older GHC

2008-11-28 Thread Simon Peyton-Jones
| I also feel that the type errors given when working with existential | types, especially GADTs with existentials, are confusing. I think | | I am using existential types to test GADT code. See | http://www.haskell.org/haskellwiki/QuickCheck_/_GADT which no longer | works with 6.10.1. Really?

Re: GADT Type Checking GHC 6.10 versus older GHC

2008-11-28 Thread Dominic Steinitz
Simon Peyton-Jones wrote: | I also feel that the type errors given when working with existential | types, especially GADTs with existentials, are confusing. I think | | I am using existential types to test GADT code. See | http://www.haskell.org/haskellwiki/QuickCheck_/_GADT which no

RE: GADT Type Checking GHC 6.10 versus older GHC

2008-11-28 Thread Simon Peyton-Jones
| arbitrarySeq :: Sequence a - Gen RepSeqVal | arbitrarySeq Nil = | return (RepSeqVal Nil Empty) | arbitrarySeq (Cons (CTMandatory (NamedType n i t)) ts) = | do u - arbitraryType t |us - arbitrarySeq ts |case u of | RepTypeVal a v - | case us of |

Re: GADT Type Checking GHC 6.10 versus older GHC

2008-11-28 Thread Dominic Steinitz
Simon Peyton-Jones wrote: | arbitrarySeq :: Sequence a - Gen RepSeqVal | arbitrarySeq Nil = | return (RepSeqVal Nil Empty) | arbitrarySeq (Cons (CTMandatory (NamedType n i t)) ts) = | do u - arbitraryType t |us - arbitrarySeq ts |case u of | RepTypeVal

GADT Type Checking GHC 6.10 versus older GHC

2008-11-27 Thread Dominic Steinitz
In my case, we had rigid type signatures all over the place. The wiki document says that the type must be rigid at the point of the match. I guess that's what we were violating. If the code I posted isn't supposed to type check then I would like to report, as user feedback, that GADTs have

RE: GADT Type Checking GHC 6.10 versus older GHC

2008-11-24 Thread Simon Peyton-Jones
In my case, we had rigid type signatures all over the place. The wiki document says that the type must be rigid at the point of the match. I guess that's what we were violating. If the code I posted isn't supposed to type check then I would like to report, as user feedback, that GADTs have

Re: GADT Type Checking GHC 6.10 versus older GHC

2008-11-24 Thread Jason Dagit
On Mon, Nov 24, 2008 at 12:23 AM, Simon Peyton-Jones [EMAIL PROTECTED]wrote: In my case, we had rigid type signatures all over the place. The wiki document says that the type must be rigid at the point of the match. I guess that's what we were violating. If the code I posted isn't

Re: GADT Type Checking GHC 6.10 versus older GHC

2008-11-22 Thread Dominic Steinitz
Jason Dagit dagit at codersbase.com writes: On Fri, Nov 21, 2008 at 8:57 AM, Simon Peyton-Jones simonpj at microsoft.com wrote: You need a type signature for the case expression. As Daniel says, this is worth a

Re: GADT Type Checking GHC 6.10 versus older GHC

2008-11-22 Thread Dominic Steinitz
Dominic Steinitz dominic.steinitz at blueyonder.co.uk writes: packaged form for my flavour of linux. I will put some work into doing this today and report back. Dominic. Phew - I installed the windows 6.10.1 package and everything to do with GADTs still seems to work. Dominic.

GADT Type Checking GHC 6.10 versus older GHC

2008-11-21 Thread Jason Dagit
Hello, Here is an example where ghc 6.8.x was fine, but now 6.10 complains. \begin{code} type CommuteFunction = forall x y. (Prim : Prim) C(x y) - Perhaps ((Prim : Prim) C(x y)) commute_split :: CommuteFunction commute_split (Split patches : patch) = toPerhaps $ do (p1 : ps) - cs (patches :

Re: GADT Type Checking GHC 6.10 versus older GHC

2008-11-21 Thread Daniel GorĂ­n
On Nov 21, 2008, at 2:04 PM, Jason Dagit wrote: Hello, [...] My understanding was that from 6.6 to 6.8, GADT type checking was refined to fill some gaps in the soundness. Did that happen again between 6.8 and 6.10 or is 6.10 being needlessly strict here? Thanks, Jason typing rules for

RE: GADT Type Checking GHC 6.10 versus older GHC

2008-11-21 Thread Simon Peyton-Jones
PROTECTED] On Behalf Of Jason Dagit | Sent: 21 November 2008 16:04 | To: glasgow-haskell-users@haskell.org | Subject: GADT Type Checking GHC 6.10 versus older GHC | | Hello, | | Here is an example where ghc 6.8.x was fine, but now 6.10 complains. | | \begin{code} | type CommuteFunction = forall x y