[commit: ghc] master: Be willing to parse {-# UNPACK #-} without '!' (deec5b7)

Simon Peyton Jones simonpj at microsoft.com
Mon Jan 14 18:09:55 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/deec5b74dee7f676b8a9f840ec7b5a813e7e0956

>---------------------------------------------------------------

commit deec5b74dee7f676b8a9f840ec7b5a813e7e0956
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Jan 10 16:50:25 2013 +0000

    Be willing to parse {-# UNPACK #-} without '!'
    
    This change gives a more helpful error message when the
    user says    data T = MkT {-# UNPACK #-} Int
    which should have a strictness '!' as well. Rather than
    just a parse error, we get
    
      T7562.hs:3:14: Warning:
        UNPACK pragma lacks '!' on the first argument of `MkT'
    
    Fixes Trac #7562

 compiler/basicTypes/DataCon.lhs     |   40 +++++++++++++++++++++-------------
 compiler/basicTypes/MkId.lhs        |   29 +++++++++++++++++-------
 compiler/deSugar/DsMeta.hs          |    4 +-
 compiler/hsSyn/Convert.lhs          |    4 +-
 compiler/iface/MkIface.lhs          |    2 +-
 compiler/main/PprTyThing.hs         |    4 +-
 compiler/parser/Parser.y.pp         |   10 ++++++--
 compiler/typecheck/TcSplice.lhs     |   11 +++++----
 compiler/typecheck/TcTyClsDecls.lhs |   13 +++++++----
 9 files changed, 73 insertions(+), 44 deletions(-)


Diff suppressed because of size. To see it, use:

    git show deec5b74dee7f676b8a9f840ec7b5a813e7e0956



More information about the ghc-commits mailing list