id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
5718,Misplaced SPECIALIZE instance pragma silently ignored,asr,,"The user's guide for GHC 7.2.2 says that a SPECIALIZE instance pragma must occur inside the ''where'' part of the instance declaration
(http://www.haskell.org/ghc/docs/7.2.2/html/users_guide/pragmas.html#specialize-instance-pragma), but it is not checked by GHC 7.2.2 (GHC 7.4.1 RC1 (7.4.0.20111219) correctly yields an error in this situation).

For example, the following code is accepted
{{{
data Foo a = MkFoo a

{-# SPECIALIZE instance Eq (Foo Int) #-}
instance (Eq a) => Eq (Foo a) where
  MkFoo a1 == MkFoo a2 = a1 == a2
}}}

I don't understand the core code, but using the flags -ddump-simpl-stats and -dppr-debug I see a different output with/without a misplaced SPECIALIZE instance pragma, so I guess the pragma is being silently ignored. Can anyone confirm this please?",bug,closed,normal,,Compiler,7.2.1,wontfix,,,Unknown/Multiple,Unknown/Multiple,GHC accepts invalid program,Unknown,,,,
