ApiAnnotations : strings in warnings do not return SourceText

Authored by alanz on May 25 2015, 4:19 PM.



The strings used in a WARNING pragma are captured via

strings :: { Located ([AddAnn],[Located FastString]) }
    : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) }

The STRING token has a method getSTRINGs that returns the original
source text for a string.

A warning of the form

{-# WARNING Logic
          , mkSolver
          , mkSimpleSolver
          , mkSolverForLogic
          , solverSetParams
          , solverPush
          , solverPop
          , solverReset
          , solverGetNumScopes
          , solverAssertCnstr
          , solverAssertAndTrack
          , solverCheck
          , solverCheckAndGetModel
          , solverGetReasonUnknown
          "New Z3 API support is still incomplete and fragile: \
          \you may experience segmentation faults!"

returns the concatenated warning string rather than the original source.

This patch now deals with all remaining instances of getSTRING to bring
in a SourceText for each.

This updates the haddock submodule as well, for the AST change.

Test Plan


Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
alanz updated this revision to Diff 2993.May 25 2015, 4:19 PM
alanz retitled this revision from to ApiAnnotations : strings in warnings do not return SourceText.
alanz updated this object.
alanz edited the test plan for this revision. (Show Details)
alanz added reviewers: hvr, austin.
alanz updated the Trac tickets for this revision.
alanz added a subscriber: mpickering.
austin accepted this revision.Jun 1 2015, 1:47 AM
austin edited edge metadata.

Okay, LGTM - just a regular change of the types...

This revision is now accepted and ready to land.Jun 1 2015, 1:47 AM
alanz updated this object.Jun 1 2015, 6:40 AM
alanz edited edge metadata.
This revision was automatically updated to reflect the committed changes.