#3966: Warn about useless UNPACK pragmas
---------------------------------------------+------------------------------
  Reporter:  tibbe                           |          Owner:                  
      Type:  feature request                 |         Status:  closed          
  Priority:  normal                          |      Milestone:  6.14.1          
 Component:  Compiler                        |        Version:  6.12.1          
Resolution:  fixed                           |       Keywords:                  
Difficulty:                                  |             Os:  Unknown/Multiple
  Testcase:  typecheck/should_compile/T3966  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown                    |  
---------------------------------------------+------------------------------
Changes (by simonpj):

  * status:  new => closed
  * testcase:  => typecheck/should_compile/T3966
  * resolution:  => fixed


Comment:

 I thought this was going to be easy:

 {{{
 Fri Apr  9 21:18:12 BST 2010  [email protected]
   * Fix Trac #3966: warn about unused UNPACK pragmas

     M ./compiler/typecheck/TcTyClsDecls.lhs -6 +11
 }}}
 but that didn't work (it was too eager, and went into the typechecker-
 black-hole).  I ended up doing quite a lot of refactoring.
 {{{
 Thu May  6 17:33:37 BST 2010  [email protected]
   * Fix Trac #3966: warn about useless UNPACK pragmas

   Warning about useless UNPACK pragmas wasn't as easy as I thought.
   I did quite a bit of refactoring, which improved the code by refining
   the types somewhat.  In particular notice that in DataCon, we have

       dcStrictMarks   :: [HsBang]
       dcRepStrictness :: [StrictnessMarks]

   The former relates to the *source-code* annotation, the latter to
   GHC's representation choice.

     M ./compiler/basicTypes/BasicTypes.lhs -14 +37
     M ./compiler/basicTypes/DataCon.lhs -14 +15
     M ./compiler/basicTypes/MkId.lhs -14 +12
     M ./compiler/hsSyn/HsTypes.lhs -11
     M ./compiler/iface/BinIface.hs -7 +9
     M ./compiler/iface/BuildTyCl.lhs -2 +2
     M ./compiler/iface/IfaceSyn.lhs -2 +5
     M ./compiler/iface/MkIface.lhs +18
     M ./compiler/main/PprTyThing.hs -6 +2
     M ./compiler/parser/Parser.y.pp -1 +1
     M ./compiler/prelude/TysWiredIn.lhs -3 +2
     M ./compiler/typecheck/TcExpr.lhs -3 +3
     M ./compiler/typecheck/TcSplice.lhs -4 +3
     M ./compiler/typecheck/TcTyClsDecls.lhs -22 +44
     M ./compiler/vectorise/VectType.hs -3 +3
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3966#comment:2>
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

Reply via email to