Using implicit parameter constraints in data decl
Simon Peyton-Jones
simonpj at microsoft.com
Sun Nov 7 14:09:56 EST 2004
Definitely a bug. Could you pls make a small module that elicits the
bug, and send it to me?
Thanks
Simon
| -----Original Message-----
| From: glasgow-haskell-bugs-bounces at haskell.org
[mailto:glasgow-haskell-bugs-
| bounces at haskell.org] On Behalf Of Benjamin Franksen
| Sent: 05 November 2004 11:31
| To: glasgow-haskell-bugs at haskell.org
| Subject: Using implicit parameter constraints in data decl
|
| This is the message from the compiler
|
| /usr/bin/ghc -cpp -package network -package posix -package lang
| -i../../runtime_loader -fimplicit-params -c PluginAPI.hs -o
PluginAPI.o
| ghc-6.2.2: panic! (the `impossible' happened, GHC version 6.2.2):
| simplCore/Simplify.lhs:1473: Non-exhaustive patterns in
function
| cat_evals
|
|
| Please report it as a compiler bug to
glasgow-haskell-bugs at haskell.org,
| or http://sourceforge.net/projects/ghc/.
|
| make: *** [PluginAPI.o] Error 1
|
| and this is the offending part of the code:
|
| data HWSPlugin = (?access_log_chan:: Control.Concurrent.Chan.Chan
| AccessLogger.LogRequest) => HWSPlugin
| { pName :: String
| , pVersion :: String
| , pInit :: Maybe InitFunc
| , pURITransHandler :: Maybe HandlerFunc --
one
| , pAccessHandler :: Maybe HandlerFunc --
all
| , pAuthHandler :: Maybe HandlerFunc --
one
| , pMimeHandler :: Maybe HandlerFunc --
one
| , pFixupHandler :: Maybe HandlerFunc --
all
| , pContentHandlers :: [(String,HandlerFunc)] --
one
| -- the line below requires the additional constraint
| , pLogHandler :: Maybe HandlerFunc --
all
| }
|
| I stumbled over this while experimenting with HWS-WP. More
specifically while
| trying to replace unsafePerformIO-style global variables with implicit
| parameters. The sources are fresh from CVS, the changes I made were
minimal
| (most of them to make everything compile with ghc-6.2.2). I can send a
tar
| file if that helps reproducing the problem.
|
| Cheers,
| Ben
| _______________________________________________
| Glasgow-haskell-bugs mailing list
| Glasgow-haskell-bugs at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list