#3100: GHC Panic "reifyType PredTy" in HAppS.Data.IxSet.inferIxSet
-------------------------------+--------------------------------------------
Reporter: mightybyte | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.1
Severity: critical | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Linux
Architecture: x86_64 (amd64) |
-------------------------------+--------------------------------------------
Changes (by simonpj):
* difficulty: => Unknown
Old description:
> Exception when trying to run compile-time code:
> ghc: panic! (the 'impossible' happened)
> (GHC version 6.10.1 for x86_64-unknown-linux):
> reifyType PredTy
>
> Code reproducing this bug can be found at:
> http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2419
>
> Marked as critical because I haven't found a workaround yet.
New description:
{{{
Exception when trying to run compile-time code:
ghc: panic! (the 'impossible' happened)
(GHC version 6.10.1 for x86_64-unknown-linux):
reifyType PredTy
}}}
Code reproducing this bug can be found at:
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2419
Marked as critical because I haven't found a workaround yet.
Comment:
Can you give me a self-contained repro case? I'm much more likely to fix
this if I can do it without downloading all of Happs.
Usually it's just a case of figuring out what the imports are, and
replacing
{{{
import Wurble
}}}
by
{{{
f :: (?x:Int) => Int -> Int
f = error "urk"
}}}
For what it's worth, the only way I can see that this crash can arise is
if you are reifying the type of an instance declaration. For example, from
the decl
{{{
class Foo a where
op1 :: a -> a
op2 :: a -> Int
instance Foo a => Foo [a] where ...
}}}
GHC generates a data type from the class decl, and a function from the
instance thus:
{{{
data TFoo a = MkTFoo (a->a) (a->Int)
dfEqList :: forall a. TFoo a -> TFoo [a]
}}}
In trying to convert this back into TH syntax in 'reifyType' it can
convert the `TFoo` on the left of the arrow to `Foo =>`, but it gets stuck
with the `TFoo` on the right.
Crashing is unhelpful I grant you. Maybe I should just return `TFoo`
(it's actually more like `:TFoo` so as to avoid name clashes with your
other data types)? But I'm still a bit unsure how yo managed to provoke
this case. More info needed pls, on (a) repro case, (b) desired result.
Simon
Thanks
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3100#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs