
Hi, Upgrading from GHC 6.6 to 6.8 has caused some code to stop working: ---------------------------------------------------------------------- {-# OPTIONS_GHC -fglasgow-exts #-} module Data2 where data CCompany data Paradise :: * -> * where CC :: Paradise CCompany rewrapCC CC = [] ---------------------------------------------------------------------- [1 of 1] Compiling Data2 ( Data2.hs, interpreted ) Data2.hs:12:9: GADT pattern match in non-rigid context for `CC' Tell GHC HQ if you'd like this to unify the context In the pattern: CC In the definition of `rewrapCC': rewrapCC CC = [] This code is from the Uniplate benchmarking code, which runs the Paradise benchmark from SYB on Uniplate, Compos and SYB. The Compos code uses GADT's, so the program first needs to convert from standard data structures to GADT's before it can work, then back at the end. It's the problem of converting from a GADT to a normal data structure that is failing. So is there an easy workaround? Or should I be asking GHC HQ to unify things? Thanks Neil

You should be giving a type signature to rewrap! That should fix it. Simon | -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@haskell.org] On Behalf Of | Neil Mitchell | Sent: 17 December 2007 16:23 | To: glasgow-haskell-users@haskell.org | Subject: GADT pattern match in non-rigid context | | Hi, | | Upgrading from GHC 6.6 to 6.8 has caused some code to stop working: | | ---------------------------------------------------------------------- | {-# OPTIONS_GHC -fglasgow-exts #-} | | module Data2 where | | data CCompany | | data Paradise :: * -> * where | CC :: Paradise CCompany | | rewrapCC CC = [] | ---------------------------------------------------------------------- | | [1 of 1] Compiling Data2 ( Data2.hs, interpreted ) | | Data2.hs:12:9: | GADT pattern match in non-rigid context for `CC' | Tell GHC HQ if you'd like this to unify the context | In the pattern: CC | In the definition of `rewrapCC': rewrapCC CC = [] | | This code is from the Uniplate benchmarking code, which runs the | Paradise benchmark from SYB on Uniplate, Compos and SYB. The Compos | code uses GADT's, so the program first needs to convert from standard | data structures to GADT's before it can work, then back at the end. | It's the problem of converting from a GADT to a normal data structure | that is failing. | | So is there an easy workaround? Or should I be asking GHC HQ to unify things? | | Thanks | | Neil | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Hi Simon,
You should be giving a type signature to rewrap! That should fix it.
Thanks, all works fine now :-) Neil
| -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@haskell.org] On Behalf Of | Neil Mitchell | Sent: 17 December 2007 16:23 | To: glasgow-haskell-users@haskell.org | Subject: GADT pattern match in non-rigid context | | Hi, | | Upgrading from GHC 6.6 to 6.8 has caused some code to stop working: | | ---------------------------------------------------------------------- | {-# OPTIONS_GHC -fglasgow-exts #-} | | module Data2 where | | data CCompany | | data Paradise :: * -> * where | CC :: Paradise CCompany | | rewrapCC CC = [] | ---------------------------------------------------------------------- | | [1 of 1] Compiling Data2 ( Data2.hs, interpreted ) | | Data2.hs:12:9: | GADT pattern match in non-rigid context for `CC' | Tell GHC HQ if you'd like this to unify the context | In the pattern: CC | In the definition of `rewrapCC': rewrapCC CC = [] | | This code is from the Uniplate benchmarking code, which runs the | Paradise benchmark from SYB on Uniplate, Compos and SYB. The Compos | code uses GADT's, so the program first needs to convert from standard | data structures to GADT's before it can work, then back at the end. | It's the problem of converting from a GADT to a normal data structure | that is failing. | | So is there an easy workaround? Or should I be asking GHC HQ to unify things? | | Thanks | | Neil | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Neil Mitchell wrote:
Hi Simon,
You should be giving a type signature to rewrap! That should fix it.
Thanks, all works fine now :-)
it would be great if the error message suggested giving a type signature as a solution (or maybe it already does, in the HEAD?) Isaac
Neil
| -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@haskell.org] On Behalf Of | Neil Mitchell | Sent: 17 December 2007 16:23 | To: glasgow-haskell-users@haskell.org | Subject: GADT pattern match in non-rigid context | | Hi, | | Upgrading from GHC 6.6 to 6.8 has caused some code to stop working: | | ---------------------------------------------------------------------- | {-# OPTIONS_GHC -fglasgow-exts #-} | | module Data2 where | | data CCompany | | data Paradise :: * -> * where | CC :: Paradise CCompany | | rewrapCC CC = [] | ---------------------------------------------------------------------- | | [1 of 1] Compiling Data2 ( Data2.hs, interpreted ) | | Data2.hs:12:9: | GADT pattern match in non-rigid context for `CC' | Tell GHC HQ if you'd like this to unify the context | In the pattern: CC | In the definition of `rewrapCC': rewrapCC CC = [] | | This code is from the Uniplate benchmarking code, which runs the | Paradise benchmark from SYB on Uniplate, Compos and SYB. The Compos | code uses GADT's, so the program first needs to convert from standard | data structures to GADT's before it can work, then back at the end. | It's the problem of converting from a GADT to a normal data structure | that is failing. | | So is there an easy workaround? Or should I be asking GHC HQ to unify things? | | Thanks | | Neil | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

| >> You should be giving a type signature to rewrap! That should fix it. | > | > Thanks, all works fine now :-) | | it would be great if the error message suggested giving a type signature | as a solution (or maybe it already does, in the HEAD?) Good point: I'll do that. Simon | >> | -----Original Message----- | >> | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell- | users-bounces@haskell.org] On Behalf Of | >> | Neil Mitchell | >> | Sent: 17 December 2007 16:23 | >> | To: glasgow-haskell-users@haskell.org | >> | Subject: GADT pattern match in non-rigid context | >> | | >> | Hi, | >> | | >> | Upgrading from GHC 6.6 to 6.8 has caused some code to stop working: | >> | | >> | ---------------------------------------------------------------------- | >> | {-# OPTIONS_GHC -fglasgow-exts #-} | >> | | >> | module Data2 where | >> | | >> | data CCompany | >> | | >> | data Paradise :: * -> * where | >> | CC :: Paradise CCompany | >> | | >> | rewrapCC CC = [] | >> | ---------------------------------------------------------------------- | >> | | >> | [1 of 1] Compiling Data2 ( Data2.hs, interpreted ) | >> | | >> | Data2.hs:12:9: | >> | GADT pattern match in non-rigid context for `CC' | >> | Tell GHC HQ if you'd like this to unify the context | >> | In the pattern: CC | >> | In the definition of `rewrapCC': rewrapCC CC = [] | >> | | >> | This code is from the Uniplate benchmarking code, which runs the | >> | Paradise benchmark from SYB on Uniplate, Compos and SYB. The Compos | >> | code uses GADT's, so the program first needs to convert from standard | >> | data structures to GADT's before it can work, then back at the end. | >> | It's the problem of converting from a GADT to a normal data structure | >> | that is failing. | >> | | >> | So is there an easy workaround? Or should I be asking GHC HQ to unify | things? | >> | | >> | Thanks | >> | | >> | Neil | >> | _______________________________________________ | >> | Glasgow-haskell-users mailing list | >> | Glasgow-haskell-users@haskell.org | >> | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users | >> | > _______________________________________________ | > Glasgow-haskell-users mailing list | > Glasgow-haskell-users@haskell.org | > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users | >
participants (3)
-
Isaac Dupree
-
Neil Mitchell
-
Simon Peyton-Jones