[GHC] #12417: API annotations for unboxed sums needs reworking
GHC
ghc-devs at haskell.org
Tue Jan 17 18:15:26 UTC 2017
#12417: API annotations for unboxed sums needs reworking
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner: alanz
Type: bug | Status: patch
Priority: normal | Milestone: 8.2.1
Component: Compiler | Version: 8.1
(Parser) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect API | Unknown/Multiple
annotation | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2968
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Alan Zimmerman <alan.zimm@…>):
In [changeset:"38f289fa2a8715d2d5869e144b764c35cba16c6a/ghc"
38f289fa/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="38f289fa2a8715d2d5869e144b764c35cba16c6a"
Fix API Annotations for unboxed sums
An unboxed tuple such as
(# | b | | | | | #)
Ends up in the parser via `tup_exprs` as
Sum 2 7 lexp
where `lexp` is a `LHsExpr`
From an API annotation perspective, the 5 `AnnVbar`s after the `b` were
attached
to `lexp`, but the leading `AnnVbar`s did not have a home.
This patch attaches them all to the the parent tuple expression. The first
(alt
- 1) of them come before `lexp`, and the remaining (arity - alt) come
after.
Test Plan: ./validate
Reviewers: osa1, austin, bgamari
Subscribers: thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D2968
GHC Trac Issues: #12417
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12417#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list