diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2017-01-23 20:23:28 +0200 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2017-01-26 15:20:14 +0200 |
commit | 0d1cb1574dd58d1026cac812e2098135823fa419 (patch) | |
tree | 2c7955bc45a085cf54bab5c7204f9ebd24686adf /utils | |
parent | ff9355e48d0cb04b3adf26e27e12e128f79618f4 (diff) | |
download | haskell-0d1cb1574dd58d1026cac812e2098135823fa419.tar.gz |
Make type import/export API Annotation friendly
Summary:
At the moment an export of the form
type C(..)
is parsed by the rule
```
| 'type' oqtycon {% amms (mkTypeImpExp (sLL $1 $> (unLoc $2)))
[mj AnnType $1,mj AnnVal $2] }
```
This means that the origiinal oqtycon loses its location which is then retained
in the AnnVal annotation.
The problem is if the oqtycon has its own annotations, these get lost.
e.g. in
type (?)(..)
the parens annotations for (?) get lost.
This patch adds a wrapper around the name in the IE type to
(a) provide a distinct location for the adornment annotation and
(b) identify the specific adornment, for use in the pretty printer rather than
occName magic.
Updates haddock submodule
Test Plan: ./validate
Reviewers: mpickering, dfeuer, bgamari, austin
Reviewed By: dfeuer
Subscribers: dfeuer, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D3016
GHC Trac Issues: #13163
Diffstat (limited to 'utils')
-rw-r--r-- | utils/check-ppr/README | 7 | ||||
m--------- | utils/haddock | 0 |
2 files changed, 5 insertions, 2 deletions
diff --git a/utils/check-ppr/README b/utils/check-ppr/README index d31442a9e9..f9b502e4a7 100644 --- a/utils/check-ppr/README +++ b/utils/check-ppr/README @@ -19,5 +19,8 @@ In a test Makefile See examples in (REPO_HOME)/testsuite/tests/printer/Makefile -If passed the --dump flag check-ppr will produce .new and .old files containing -the ASTs before and after round-tripping to aid debugging. +The utility generates the following files for ToBeTested.hs + + - ToBeTested.ppr.hs : the ppr result + - ToBeTested.hs.ast : the AST of the original source + - ToBeTested.hs.ast.new : the AST of the re-parsed ppr source diff --git a/utils/haddock b/utils/haddock -Subproject 4349092ef61ca7da7c7cbcd9aa7dcbb97fe59bd +Subproject 7f1987b35eb7bb15ca2fd93321440af519dd8cd |