[commit: ghc] wip/api-annots: ApiAnnotations : AST version of nested forall loses forall annotation (1c3e7af)
git at git.haskell.org
git at git.haskell.org
Sat May 9 14:18:00 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/api-annots
Link : http://ghc.haskell.org/trac/ghc/changeset/1c3e7af71b01395fa961fcc519559ddc6e27b046/ghc
>---------------------------------------------------------------
commit 1c3e7af71b01395fa961fcc519559ddc6e27b046
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date: Fri May 8 12:12:05 2015 +0200
ApiAnnotations : AST version of nested forall loses forall annotation
Summary:
When parsing
{-# LANGUAGE ScopedTypeVariables #-}
extremumNewton :: forall tag. forall tag1.
tag -> tag1 -> Int
extremumNewton = undefined
the parser creates nested HsForAllTy's for the two forall statements.
These get flattened into a single one in `HsTypes.mk_forall_ty`
This patch removes the flattening, so that API Annotations are not lost in the
process.
Test Plan: ./validate
Reviewers: goldfire, austin, simonpj
Subscribers: bgamari, mpickering, thomie, goldfire
Differential Revision: https://phabricator.haskell.org/D836
GHC Trac Issues: #10278, #10315, #10354, #10363
Conflicts:
testsuite/tests/ghc-api/annotations/.gitignore
testsuite/tests/ghc-api/annotations/Makefile
testsuite/tests/ghc-api/annotations/all.T
>---------------------------------------------------------------
1c3e7af71b01395fa961fcc519559ddc6e27b046
compiler/hsSyn/Convert.hs | 5 +-
compiler/hsSyn/HsSyn.hs | 2 +-
compiler/hsSyn/HsTypes.hs | 59 +++++++-------
compiler/parser/Parser.y | 4 +-
compiler/parser/RdrHsSyn.hs | 8 +-
compiler/rename/RnTypes.hs | 21 +++++
compiler/typecheck/TcHsType.hs | 12 +++
testsuite/tests/ghc-api/annotations/.gitignore | 1 +
testsuite/tests/ghc-api/annotations/Makefile | 9 +++
testsuite/tests/ghc-api/annotations/T10278.stderr | 16 ++++
testsuite/tests/ghc-api/annotations/T10278.stdout | 91 ++++++++++++++++++++++
testsuite/tests/ghc-api/annotations/T10312.stdout | 2 +
testsuite/tests/ghc-api/annotations/T10358.stderr | 12 +++
testsuite/tests/ghc-api/annotations/Test10278.hs | 12 +++
testsuite/tests/ghc-api/annotations/all.T | 1 +
.../tests/ghc-api/annotations/boolFormula.stderr | 17 ----
.../ghc-api/annotations/{t10357.hs => t10278.hs} | 2 +-
.../tests/rename/should_fail/rnfail026.stderr | 4 +-
testsuite/tests/typecheck/should_fail/T3540.stderr | 10 +--
19 files changed, 229 insertions(+), 59 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 1c3e7af71b01395fa961fcc519559ddc6e27b046
More information about the ghc-commits
mailing list