
Evan Laforge wrote:
I've been getting a mysterious error for a while now. It's come and gone, but seems to be showing up slightly more consistently now. Before I was on ghc 6.8.2 and now I'm on ghc 6.8.3, OS X 10.4 and now 10.5, i386 arch. The problem is that randomly while compiling I get an error like this:
unknown flags in {-# OPTIONS #-} pragma: -XDeriveDataTypeabl
It looks like somehow pragma parsing gets a bunch of random junk scrambled in. In the past this would happen consistently until I did a make clean and rebuild, but more recently all I have to do is try again and it doesn't happen the second time. I haven't gotten it while compiling for a while, but since I'm using hint which uses the ghc api to interpret haskell, I'm getting this quite frequently inside a GhcException when hint wants to interpret some code. I've also gotten this from ghci occasionally, and the usual fix is just to do a reload, and the second time it works.
Does this sound familiar to anyone? It's not fatal since a retry clears things up, but it's a little worrying and would not look very good in released software. I cast about a bit on the ghc trac and didn't find any open bugs like this.
This is one symptom of http://hackage.haskell.org/trac/ghc/ticket/1736, which turned out to be the same bug as http://hackage.haskell.org/trac/ghc/ticket/2240, and haunted us for a long time before we found it. Sadly we found it after the 6.8.3 release, but you could backport the fix and build your own 6.8.3 if you are badly affected. Cheers, Simon