[commit: ghc] master: Api Annotations: RdrHsSyn.mkAtDefault causes annotations to be disconnected. (811b72a)
git at git.haskell.org
git at git.haskell.org
Mon May 11 07:33:35 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/811b72adedcd12149783eac19ebccff1dd72bc1c/ghc
>---------------------------------------------------------------
commit 811b72adedcd12149783eac19ebccff1dd72bc1c
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date: Mon May 11 09:34:27 2015 +0200
Api Annotations: RdrHsSyn.mkAtDefault causes annotations to be disconnected.
Summary:
The code for mkAtDefault is as follows.
mkATDefault (L loc (TyFamInstDecl { tfid_eqn = L _ e }))
| TyFamEqn { tfe_tycon = tc, tfe_pats = pats, tfe_rhs = rhs } <- e
= do { tvs <- checkTyVars (ptext (sLit "default")) equalsDots tc (hswb_cts pats)
; return (L loc (TyFamEqn { tfe_tycon = tc
, tfe_pats = tvs
, tfe_rhs = rhs })) }
An associated type in a class of the form
type FoldableConstraint t x = ()
has an AnnEqual attached to the location in tfid_eqn. Since the location
is discarded, this annotation is then disconnected from the AST.
Test Plan: ./validate
Reviewers: hvr, austin
Reviewed By: austin
Subscribers: bgamari, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D842
GHC Trac Issues: #10307
>---------------------------------------------------------------
811b72adedcd12149783eac19ebccff1dd72bc1c
compiler/parser/Parser.y | 32 +++++++++++--------
testsuite/tests/ghc-api/annotations/.gitignore | 1 +
testsuite/tests/ghc-api/annotations/Makefile | 8 +++++
testsuite/tests/ghc-api/annotations/T10307.stdout | 36 ++++++++++++++++++++++
testsuite/tests/ghc-api/annotations/Test10307.hs | 6 ++++
testsuite/tests/ghc-api/annotations/all.T | 1 +
.../ghc-api/annotations/{t10312.hs => t10307.hs} | 2 +-
7 files changed, 72 insertions(+), 14 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 811b72adedcd12149783eac19ebccff1dd72bc1c
More information about the ghc-commits
mailing list