diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2015-12-22 12:35:22 +0200 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2015-12-22 13:49:28 +0200 |
commit | b407bd775d9241023b4694b3142a756df0082ea2 (patch) | |
tree | 8c44ab0559de6b17b8659389198276a3cbf1f26a /compiler/parser/Parser.y | |
parent | ea3f733a24840c0d9d9a89b85e2699fabb633a8f (diff) | |
download | haskell-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.y | 3 |
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 |