#4870: Compiler panic with SPECIALIZE pragma on function from imported module
---------------------------------+------------------------------------------
Reporter: dreixel | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.0.1 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Consider the following two modules:
{{{
module Test1 where
class C a where c :: a -> a
{-# INLINE f #-}
f :: (C a) => a
f = c f
}}}
{{{
module Test2 where
import Test1
data D
instance C D
{-# SPECIALIZE f :: D #-}
}}}
ghc-7.0.1 invoked with -O Test2 results in
{{{
[1 of 2] Compiling Test1 ( Test1.hs, Test1.o )
[2 of 2] Compiling Test2 ( Test2.hs, Test2.o )
ghc: panic! (the 'impossible' happened)
(GHC version 7.0.1 for i386-unknown-mingw32):
dsImpSpecs main:Test1.f{v r2} [gid]
}}}
This is a highly simplified example of a desired rewrite rule in the
generic programming library Multirec. Note that there is no problem if the
code is all in the same module.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4870>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs