#2562: GADTs: (.text+0xc6): undefined reference to `Main_IsEqual_con_info'
-------------------------+--------------------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.10.1
Component: Compiler | Version: 6.8.2
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Architecture: Unknown | Os: Unknown
-------------------------+--------------------------------------------------
With this module:
{{{
{-# LANGUAGE ScopedTypeVariables, GADTs #-}
import Unsafe.Coerce
data IsEqual a b where
IsEqual :: IsEqual a a
contextsEqual :: cxt1 -> cxt2 -> IsEqual cxt1 cxt2
contextsEqual = unsafeCoerce IsEqual
data Seq from to where
Nil :: Seq here here
foo :: forall from to . Seq from to
foo = f undefined undefined
where f :: from -> to -> Seq from to
f x y = case contextsEqual x y of
IsEqual -> Nil
main :: IO ()
main = case foo :: Seq () () of
Nil -> return ()
}}}
I get:
{{{
$ ghc --make z -fforce-recomp -O
[1 of 1] Compiling Main ( z.hs, z.o )
Linking z ...
z.o: In function `smk_info':
(.text+0xc6): undefined reference to `Main_IsEqual_con_info'
collect2: ld returned 1 exit status
}}}
with the HEAD and 6.8.2.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2562>
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