[GHC] #10313: ApiAnnotations : strings in warnings do not return SourceText
GHC
ghc-devs at haskell.org
Mon Jun 1 12:16:35 UTC 2015
#10313: ApiAnnotations : strings in warnings do not return SourceText
-------------------------------------+-------------------------------------
Reporter: alanz | Owner: alanz
Type: bug | Status: patch
Priority: normal | Milestone: 7.10.2
Component: Compiler | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | ApiAnnotations
Type of failure: None/Unknown | Architecture:
Blocked By: | Unknown/Multiple
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions: Phab:D907
-------------------------------------+-------------------------------------
Comment (by Alan Zimmerman <alan.zimm@…>):
In [changeset:"e6191d1cc37e98785af8b309100ea840084fa3ba/ghc"]:
{{{
#!CommitTicketReference repository="ghc"
revision="e6191d1cc37e98785af8b309100ea840084fa3ba"
ApiAnnotations : strings in warnings do not return SourceText
Summary:
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: ./validate
Reviewers: hvr, austin, goldfire
Reviewed By: austin
Subscribers: bgamari, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D907
GHC Trac Issues: #10313
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10313#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list