summaryrefslogtreecommitdiff
path: root/compiler/parser
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2014-02-20 01:28:00 -0600
committerAustin Seipp <austin@well-typed.com>2014-02-20 03:13:41 -0600
commitd3af9807ca8a1db0bc9298ea50895ee9df55edb7 (patch)
tree0fadedf88fdfde1290c6d5adc859711b0ffa50fa /compiler/parser
parentf99a0321a8cf0507924a0d30b6b7b586d7855129 (diff)
downloadhaskell-d3af9807ca8a1db0bc9298ea50895ee9df55edb7.tar.gz
Really fix #5682 (parsing of promoted datacons)
Patch submitted by an anonymous friend on the bug tracker. This also fixes TH_RichKinds2 which had a slight message output wibble (it uses the qualified name of the promoted datacon) Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler/parser')
-rw-r--r--compiler/parser/Parser.y.pp7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index d2bc463b62..27d6c3839f 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -1151,12 +1151,11 @@ atype :: { LHsType RdrName }
| TH_ID_SPLICE { LL $ mkHsSpliceTy $ L1 $ HsVar $
mkUnqual varName (getTH_ID_SPLICE $1) }
-- see Note [Promotion] for the followings
- | SIMPLEQUOTE qconid { LL $ HsTyVar $ unLoc $2 }
- | SIMPLEQUOTE '(' ')' { LL $ HsTyVar $ getRdrName unitDataCon }
+ | SIMPLEQUOTE qcon { LL $ HsTyVar $ unLoc $2 }
| SIMPLEQUOTE '(' ctype ',' comma_types1 ')' { LL $ HsExplicitTupleTy [] ($3 : $5) }
| SIMPLEQUOTE '[' comma_types0 ']' { LL $ HsExplicitListTy placeHolderKind $3 }
- | SIMPLEQUOTE '(' qconop ')' { LL $ HsTyVar (unLoc $3) }
- | SIMPLEQUOTE '(' varop ')' { LL $ HsTyVar (unLoc $3) }
+ | SIMPLEQUOTE var { LL $ HsTyVar $ unLoc $2 }
+
| '[' ctype ',' comma_types1 ']' { LL $ HsExplicitListTy placeHolderKind ($2 : $4) }
| INTEGER {% mkTyLit $ LL $ HsNumTy $ getINTEGER $1 }
| STRING {% mkTyLit $ LL $ HsStrTy $ getSTRING $1 }