[commit: ghc] master: ApiAnnotations : parens around a context with wildcard loses annotations (0df14b5)
git at git.haskell.org
git at git.haskell.org
Thu May 21 13:05:57 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/0df14b5db06751f817d3ba794cc74ac54519b5b8/ghc
>---------------------------------------------------------------
commit 0df14b5db06751f817d3ba794cc74ac54519b5b8
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date: Thu May 21 15:05:48 2015 +0200
ApiAnnotations : parens around a context with wildcard loses annotations
Summary:
In the following code, the extra set of parens around the context end up
with detached annotations.
{-# LANGUAGE PartialTypeSignatures #-}
module ParensAroundContext where
f :: ((Eq a, _)) => a -> a -> Bool
f x y = x == y
Trac ticket #10354
It turns out it was the TupleTy that was the culprit.
This may also solve #10315
Test Plan: ./validate
Reviewers: hvr, austin, goldfire
Reviewed By: austin
Subscribers: goldfire, bgamari, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D868
GHC Trac Issues: #10354, #10315
>---------------------------------------------------------------
0df14b5db06751f817d3ba794cc74ac54519b5b8
compiler/parser/Parser.y | 10 +--
compiler/parser/RdrHsSyn.hs | 18 +++--
testsuite/tests/ghc-api/annotations/.gitignore | 1 +
testsuite/tests/ghc-api/annotations/Makefile | 8 ++
testsuite/tests/ghc-api/annotations/T10278.stdout | 16 ++--
testsuite/tests/ghc-api/annotations/T10354.stderr | 3 +
testsuite/tests/ghc-api/annotations/T10354.stdout | 90 ++++++++++++++++++++++
testsuite/tests/ghc-api/annotations/Test10354.hs | 14 ++++
testsuite/tests/ghc-api/annotations/all.T | 1 +
.../ghc-api/annotations/{t10278.hs => t10354.hs} | 2 +-
10 files changed, 141 insertions(+), 22 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 0df14b5db06751f817d3ba794cc74ac54519b5b8
More information about the ghc-commits
mailing list