summaryrefslogtreecommitdiff
path: root/compiler/deSugar
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2013-01-10 16:50:25 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2013-01-14 16:45:13 +0000
commitdeec5b74dee7f676b8a9f840ec7b5a813e7e0956 (patch)
tree1976ac7b4606aded369f5ff9c9b468fa5677f0a8 /compiler/deSugar
parent343548da7274cd15aaeabe72c6b37bce78e9af9c (diff)
downloadhaskell-deec5b74dee7f676b8a9f840ec7b5a813e7e0956.tar.gz
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
Diffstat (limited to 'compiler/deSugar')
-rw-r--r--compiler/deSugar/DsMeta.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs
index fd57f4656a..04ffb766a0 100644
--- a/compiler/deSugar/DsMeta.hs
+++ b/compiler/deSugar/DsMeta.hs
@@ -557,8 +557,8 @@ repBangTy ty= do
rep2 strictTypeName [s, t]
where
(str, ty') = case ty of
- L _ (HsBangTy (HsBang True) ty) -> (unpackedName, ty)
- L _ (HsBangTy _ ty) -> (isStrictName, ty)
+ L _ (HsBangTy (HsUserBang (Just True) True) ty) -> (unpackedName, ty)
+ L _ (HsBangTy (HsUserBang _ True) ty) -> (isStrictName, ty)
_ -> (notStrictName, ty)
-------------------------------------------------------