Opened 5 years ago

Closed 5 years ago

#10287 closed bug (fixed)

ApiAnnotations : BooleanFormula construction discards original

Reported by: alanz Owned by: alanz
Priority: normal Milestone: 7.10.2
Component: Compiler Version: 7.10.1
Keywords: ApiAnnotations Cc: mpickering
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D837
Wiki Page:

Description

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.

Change History (4)

comment:1 Changed 5 years ago by alanz

Differential Rev(s): Phab:D837

comment:2 Changed 5 years ago by alanz

Status: newpatch

comment:3 Changed 5 years ago by Alan Zimmerman <alan.zimm@…>

In 24707d72d6137cb970878ef243c090a6bf6601e0/ghc:

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

comment:4 Changed 5 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged to ghc-7.10.

Note: See TracTickets for help on using tickets.