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

Neil Mitchell ndmitchell at gmail.com
Thu Nov 12 13:14:07 EST 2009


Hi Joe,

> 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)?

http://hackage.haskell.org/trac/ghc/wiki/ReportABug - this is the
reference. Do as many steps on this list as you want to, the more the
easier it is for the GHC people, but they all take time:

1) Attach all the source code, enough to replicate the bug.
2) Download GHC 6.12 and check that it's still a bug there (if it's
been fixed then it doesn't matter).
3) Start to boil down the test case by removing Email etc

The important thing is to replicate the bug, but if you go further
then it's less work for the GHC people. Don't try reducing the bug
with GHC 6.10.4 though, because if it's a very subtle bug then you may
stop it happening on other versions.

> Upon changing that, everything compiles fine and ghc hums along happily.
>
> Should I still submit a bug report for a bad error message?

Yes, you crashed the compiler - that's a bug, even if it was caused by
invalid source code.

Thanks, Neil


On Thu, Nov 12, 2009 at 6:12 PM, Joe Fredette <jfredett at gmail.com> wrote:
> 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