Ticket #2562 (closed bug: invalid)
GADTs: (.text+0xc6): undefined reference to `Main_IsEqual_con_info'
| Reported by: | igloo | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.10.1 |
| Component: | Compiler | Version: | 6.8.2 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.
