#7562: Parse error with {-# UNPACK #-} Int -----------------------------+---------------------------------------------- Reporter: nomeata | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.1 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Comment(by simonpj@…): commit deec5b74dee7f676b8a9f840ec7b5a813e7e0956 {{{ Author: Simon Peyton Jones <simonpj@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(-) }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7562#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler