#2520: SPECIALIZE causing duplicate assembler symbols
-----------------------+----------------------------------------------------
Reporter: ganesh | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.9 | Severity: normal
Keywords: | Testcase:
Architecture: x86 | Os: Linux
-----------------------+----------------------------------------------------
The program below causes duplicate assembler symbols when compiled -O with
ghc 6.9.20080816 (but not with ghc 6.8.2)
There's no profiling involved otherwise I'd have assumed this was a
duplicate of #2410.
{{{
{-# LANGUAGE GADTs #-}
module Types where
data Prod a b = Prod a b
data Nil = Nil
class ProdSel f where
nil :: f Nil
prod :: f x -> f y -> f (Prod x y)
instance ProdSel SqlFields where
nil = SFNil
prod = SFProd
{-# SPECIALIZE reproject :: SqlFields a -> SqlFields a #-}
reproject :: ProdSel f => SqlFields a -> f a
reproject SFNil = nil
reproject (SFProd a b) = prod (reproject a) (reproject b)
data SqlFields a where
SFNil :: SqlFields Nil
SFProd :: SqlFields a -> SqlFields b -> SqlFields (Prod a b)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2520>
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