#3966: Warn about useless UNPACK pragmas
---------------------------------+------------------------------------------
    Reporter:  tibbe             |       Owner:              
        Type:  feature request   |      Status:  new         
    Priority:  normal            |   Component:  Compiler    
     Version:  6.12.1            |    Keywords:              
          Os:  Unknown/Multiple  |    Testcase:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------
 I have on several occasions seen code with useless UNPACK pragmas.
 Example:

 {{{
 data Foo a b = Foo {-# UNPACK #-} !(a -> b)
 }}}

 or

 {{{
 data Enum = A Int | B Double
 data Foo = {-# UNPACK #-} !Enum
 }}}

 By emitting a warning for those cases where the pragma has no effect we
 could help people understand how to use it correctly (rather than
 sprinkling it everywhere and hope for the best).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3966>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to