summaryrefslogtreecommitdiff
path: root/compiler/parser/ApiAnnotation.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2015-05-06 08:07:39 -0500
committerAustin Seipp <austin@well-typed.com>2015-05-06 08:09:52 -0500
commit15aafc7fb61d2cbf95f2a564762399e82fe44e9c (patch)
treee359e4a1f103e7a9eed1f28636df3eb01e2300fd /compiler/parser/ApiAnnotation.hs
parentcaeae1a33e28745b51d952b034e253d3e51e0605 (diff)
downloadhaskell-15aafc7fb61d2cbf95f2a564762399e82fe44e9c.tar.gz
ApiAnnotations : quoted type variables missing leading quote
The HsOpTy can be constructed for a promoted type operator, in which case it has the following form | btype SIMPLEQUOTE qconop type { sLL $1 $> $ mkHsOpTy $1 $3 $4 } | btype SIMPLEQUOTE varop type { sLL $1 $> $ mkHsOpTy $1 $3 $4 } The SIMPLEQUOTE does not get an annotation, so cannot be reproduced via the API Annotations. Also, in splice_exp :: { LHsExpr RdrName } : TH_ID_SPLICE { sL1 $1 $ mkHsSpliceE (sL1 $1 $ HsVar (mkUnqual varName (getTH_ID_SPLICE $1))) } | '$(' exp ')' {% ams (sLL $1 $> $ mkHsSpliceE $2) [mo $1,mc $3] } | TH_ID_TY_SPLICE { sL1 $1 $ mkHsSpliceTE (sL1 $1 $ HsVar (mkUnqual varName (getTH_ID_TY_SPLICE $1))) } | '$$(' exp ')' {% ams (sLL $1 $> $ mkHsSpliceTE $2) [mo $1,mc $3] } the TH_ID_SPLICE and TH_ID_TY_SPLICE positions are lost. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D825 GHC Trac Issues: #10268
Diffstat (limited to 'compiler/parser/ApiAnnotation.hs')
-rw-r--r--compiler/parser/ApiAnnotation.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/parser/ApiAnnotation.hs b/compiler/parser/ApiAnnotation.hs
index e8ad8ea879..babd93a0ab 100644
--- a/compiler/parser/ApiAnnotation.hs
+++ b/compiler/parser/ApiAnnotation.hs
@@ -228,6 +228,7 @@ data AnnKeywordId
| AnnMinus -- ^ '-'
| AnnModule
| AnnNewtype
+ | AnnName -- ^ where a name loses its location in the AST, this carries it
| AnnOf
| AnnOpen -- ^ '(\#' or '{-\# LANGUAGE' etc
| AnnOpenC -- ^ '{'
@@ -242,8 +243,11 @@ data AnnKeywordId
| AnnRole
| AnnSafe
| AnnSemi -- ^ ';'
+ | AnnSimpleQuote -- ^ '''
| AnnStatic -- ^ 'static'
| AnnThen
+ | AnnThIdSplice -- ^ '$'
+ | AnnThIdTySplice -- ^ '$$'
| AnnTilde -- ^ '~'
| AnnTildehsh -- ^ '~#'
| AnnType