summaryrefslogtreecommitdiff
path: root/compiler/parser
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-03-05 14:50:00 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2018-03-05 14:50:00 +0000
commit7d491ae76b32a78c1ea09a324f67937adceecfc2 (patch)
tree4ca58d1ed8cf8800a5d91e8246583ec0cc486407 /compiler/parser
parent1c062b794bf71a329f65813ce7b72fe2bd3935f0 (diff)
downloadhaskell-wip/T13324.tar.gz
Use LHsSigWcType in DerivDeclwip/T13324
This prepares the way for the fix for Trac #13324, by using LHsSigWcType for the instance type in DerivDecl, but nowhere else. See comments on Phab:D4383
Diffstat (limited to 'compiler/parser')
-rw-r--r--compiler/parser/Parser.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index 898ed3c5ae..bdb5e6b479 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -1373,10 +1373,11 @@ capi_ctype : '{-# CTYPE' STRING STRING '#-}'
-- Glasgow extension: stand-alone deriving declarations
stand_alone_deriving :: { LDerivDecl GhcPs }
- : 'deriving' deriv_strategy 'instance' overlap_pragma inst_type
+ : 'deriving' deriv_strategy 'instance' overlap_pragma sigtype
{% do { let { err = text "in the stand-alone deriving instance"
- <> colon <+> quotes (ppr $5) }
- ; ams (sLL $1 (hsSigType $>) (DerivDecl $5 $2 $4))
+ <> colon <+> quotes (ppr $5)
+ ; inst_ty = mkLHsSigWcType $5 }
+ ; ams (sLL $1 $> (DerivDecl inst_ty $2 $4))
[mj AnnDeriving $1, mj AnnInstance $3] } }
-----------------------------------------------------------------------------