[commit: ghc] wip/7.10-api-annots2: ApiAnnotations : BooleanFormula construction discards original (aa23b24)

git at git.haskell.org git at git.haskell.org
Mon May 11 21:37:01 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/7.10-api-annots2
Link       : http://ghc.haskell.org/trac/ghc/changeset/aa23b2446d3241391bbfad7ea1e811e67ec0b17d/ghc

>---------------------------------------------------------------

commit aa23b2446d3241391bbfad7ea1e811e67ec0b17d
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Mon May 11 14:19:14 2015 +0200

    ApiAnnotations : BooleanFormula construction discards original
    
    Summary:
    The MINIMAL pragma is captured in the parser using a BooleanFormula.
    
    The constructors (mkBool,mkAnd,mkOr) are smart and try to minimise the
    boolean formula as it is constructed.
    
    This discards the original information, making round tripping
    impossible.
    
    Note: there is another version which provides a more API Annotations
    friendly version of the MINIMAL pragma, but this requires changes to
    haddock, which will cause problems for 7.10.2.
    
    See https://github.com/alanz/ghc/tree/wip/10287
    
    Test Plan: ./validate
    
    Reviewers: hvr, austin
    
    Reviewed By: austin
    
    Subscribers: bgamari, Fuuzetsu, thomie, mpickering
    
    Differential Revision: https://phabricator.haskell.org/D837
    
    GHC Trac Issues: #10287
    
    (cherry picked from commit 24707d72d6137cb970878ef243c090a6bf6601e0)


>---------------------------------------------------------------

aa23b2446d3241391bbfad7ea1e811e67ec0b17d
 compiler/parser/Parser.y                           |  10 +-
 testsuite/tests/ghc-api/annotations/.gitignore     |   1 +
 testsuite/tests/ghc-api/annotations/Makefile       |   8 +
 .../tests/ghc-api/annotations/TestBoolFormula.hs   |  26 ++++
 testsuite/tests/ghc-api/annotations/all.T          |   1 +
 .../annotations/{t10269.hs => boolFormula.hs}      |   2 +-
 .../tests/ghc-api/annotations/boolFormula.stderr   |  17 +++
 .../tests/ghc-api/annotations/boolFormula.stdout   | 163 +++++++++++++++++++++
 8 files changed, 222 insertions(+), 6 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 aa23b2446d3241391bbfad7ea1e811e67ec0b17d


More information about the ghc-commits mailing list