logo       

Using implicit parameter constraints in data decl: msg#00008

lang.haskell.glasgow.bugs

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@xxxxxxxxxxx,
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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise