summaryrefslogtreecommitdiff
path: root/compiler/parser/Parser.y
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2015-12-22 12:35:22 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2015-12-22 13:49:28 +0200
commitb407bd775d9241023b4694b3142a756df0082ea2 (patch)
tree8c44ab0559de6b17b8659389198276a3cbf1f26a /compiler/parser/Parser.y
parentea3f733a24840c0d9d9a89b85e2699fabb633a8f (diff)
downloadhaskell-b407bd775d9241023b4694b3142a756df0082ea2.tar.gz
Retain AnnTilde in splitTildeApps
splitTildeApps can introduce a new HsAppInfix for a tilde, with a fresh SrcSpan, disconnecting its existing AnnTilde API Annotation. A tilde needs AnnTilde to render properly, this patch adds a new one on the fresh SrcSpan
Diffstat (limited to 'compiler/parser/Parser.y')
-rw-r--r--compiler/parser/Parser.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index d6255a34b4..2b4e779db6 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -1652,7 +1652,8 @@ typedoc :: { LHsType RdrName }
-- See Note [Parsing ~]
btype :: { LHsType RdrName }
- : tyapps { sL1 $1 $ HsAppsTy (splitTildeApps (reverse (unLoc $1))) }
+ : tyapps {% splitTildeApps (reverse (unLoc $1)) >>=
+ \ts -> return $ sL1 $1 $ HsAppsTy ts }
-- Used for parsing Haskell98-style data constructors,
-- in order to forbid the blasphemous