|
RE: newtype deriving panic: msg#00053lang.haskell.glasgow.bugs
Thanks. Should be rejected, because MonadState takes two type parameters, and the deriving stuff only allows one. You might be able to say ...deriving(MonadState m) or some such I'll fix up the compiler to reject it more gracefully Simon | -----Original Message----- | From: Dean Herington [mailto:heringto@xxxxxxxxxx] | Sent: 22 January 2003 21:45 | To: glasgow-haskell-bugs@xxxxxxxxxxx | Subject: newtype deriving panic | | Given this program: | | {-# OPTIONS -fglasgow-exts #-} | | module Bug1 where | | import Control.Monad.State | | newtype T a = T (StateT Int IO a) deriving (MonadState) | | | GHC 5.04.2 chokes: | | ghc-5.04.2: chasing modules from: Bug1 | Compiling Bug1 ( Bug1.hs, ./Bug1.o ) | ghc-5.04.2: panic! (the `impossible' happened, GHC version 5.04.2): | basicTypes/VarEnv.lhs:173: Non-exhaustive patterns in case | | | Of course, the program is in error. (It should derive `MonadState Int`.) | | | _______________________________________________ | Glasgow-haskell-bugs mailing list | Glasgow-haskell-bugs@xxxxxxxxxxx | http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: higher-order typing errors, Simon Peyton-Jones |
|---|---|
| Next by Date: | [ ghc-Bugs-672813 ] bad type does bad things, SourceForge.net |
| Previous by Thread: | newtype deriving panic, Dean Herington |
| Next by Thread: | higher-order typing errors, Dean Herington |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |