diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2017-02-17 12:13:14 +0200 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2017-02-18 20:40:09 +0200 |
commit | 43a082bb59310d10d3c7550d5cbeaab384ca4c76 (patch) | |
tree | 4aa60f80be7e87ede1db0af69e2c3e20d14d16a9 /compiler/parser/ApiAnnotation.hs | |
parent | 98e494afed3c73f88ff1d57a9ca46b1f6ddbd1b9 (diff) | |
download | haskell-wip/embelleshed-rdr.tar.gz |
Add HsEmbellished type to hsSynwip/embelleshed-rdr
Summary:
A RdrName can be parsed with parens or backquotes if it is used prefix or infix
respectively when it is normally not used that way.
This is not captured in hsSyn, and must be inferred from the occName when pretty
printing, or using the API annotations.
Introduce a wrapper type around the name to capture this
data Embellished name
= EName name
| EParens (Located name)
| EBackquotes (Located name)
So that we now have
data HsExpr id
= HsVar (LEmbellished id) -- ^ Variable
and in the other relevant points in hsSyn.
Test Plan: ./validate
Reviewers: bgamari, austin, goldfire
Subscribers: goldfire, thomie, mpickering, snowleopard
Differential Revision: https://phabricator.haskell.org/D3145
Diffstat (limited to 'compiler/parser/ApiAnnotation.hs')
-rw-r--r-- | compiler/parser/ApiAnnotation.hs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/parser/ApiAnnotation.hs b/compiler/parser/ApiAnnotation.hs index b20f23f066..9d289d0d25 100644 --- a/compiler/parser/ApiAnnotation.hs +++ b/compiler/parser/ApiAnnotation.hs @@ -242,7 +242,6 @@ data AnnKeywordId | AnnMinus -- ^ '-' | AnnModule | AnnNewtype - | AnnName -- ^ where a name loses its location in the AST, this carries it | AnnOf | AnnOpen -- ^ '(\#' or '{-\# LANGUAGE' etc | AnnOpenC -- ^ '{' |