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

Joe Fredette jfredett at gmail.com
Thu Nov 12 13:12:03 EST 2009


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
>



More information about the Haskell-Cafe mailing list