[Haskell-cafe] The weirdest error I've ever seen...

Simon Peyton-Jones simonpj at microsoft.com
Fri Nov 13 03:10:53 EST 2009


It's not a bad error message -- it's a crash, and that should never happen.

Ideally, boil down the program to something small that still exhibits the crash, and submit that.  Perhaps just the newtype declaration alone, with supporting definitions for ContextMatch etc?  Try removing unnecessary stuff, to get it as small as possible.

Thanks

Simon

| -----Original Message-----
| From: haskell-cafe-bounces at haskell.org [mailto:haskell-cafe-bounces at haskell.org] On
| Behalf Of Joe Fredette
| Sent: 12 November 2009 18:12
| To: Joe Fredette
| Cc: Simon Peyton-Jones; Haskell Cafè
| Subject: Re: [Haskell-cafe] The weirdest error I've ever seen...
| 
| Actually, I just solved the problem... I think...
| 
| In my original code, I had the newtype:
| 
| 
|    newtype FilterState t => Filter t a = Filter (ContextMatch t a)
|        deriving (Functor, Monad, MonadReader Email, MonadState Bool,
| MonadIO)
| 
| I was trying to confirm that it actually was the `deriving ...
| MonadState Bool ...` part that was causing the problem, and then I
| realized, it's not `MonadState Bool` I want, it's `MonadState t`.
| 
| Upon changing that, everything compiles fine and ghc hums along happily.
| 
| Should I still submit a bug report for a bad error message?
| 
| /Joe
| 
| On Nov 12, 2009, at 12:58 PM, Joe Fredette wrote:
| 
| > Okay, so -- I feel totally awesome -- I never found a GHC bug
| > before... and a Haskell Celebrity responded to my post! *swoons* :)
| >
| > Serious question now, There's a fair amount of definitely irrelevant
| > code (like the definition of the `Email` type, etc), should I post
| > that in the report too (assuming it doesn't work in 6.12 or I can't
| > get 6.12 working to try it)?
| >
| > Thanks,
| >
| > /Joe
| >
| > On Nov 12, 2009, at 4:07 AM, Simon Peyton-Jones wrote:
| >
| >> | [1 of 3] Compiling Network.HackMail.Email.ParseEmail ( Network/
| >> | HackMail/Email/ParseEmail.hs, interpreted )
| >> | [2 of 3] Compiling Network.HackMail.Email.Email ( Network/HackMail/
| >> | Email/Email.hs, interpreted )
| >> | [3 of 3] Compiling Network.HackMail.Filter.Filter ( Network/
| >> HackMail/
| >> | Filter/Filter.hs, interpreted )
| >> | *** Exception: No match in record selector Var.tcTyVarDetails
| >>
| >> This is a bug in GHC without a doubt.
| >>
| >> It's possible that it's fixed in 6.12 -- can you try the release
| >> candidate?  If it is not fixed, or if it's too hard for you to try,
| >> can you submit a Trac bug report please? (Include your code, and
| >> instructions for how to reproduce.
| >>
| >> Thanks
| >>
| >> Simon
| >
| 
| _______________________________________________
| Haskell-Cafe mailing list
| Haskell-Cafe at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list