id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
2520,SPECIALIZE causing duplicate assembler symbols,ganesh,simonpj,"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)

}}}",bug,closed,normal,,Compiler,6.9,fixed,,,Linux,x86,,Unknown,simplCore/should_compile/T2520,,,
