[GHC] #10313: ApiAnnotations : strings in warnings do not return SourceText

GHC ghc-devs at haskell.org
Sat Jul 25 08:38:45 UTC 2015


#10313: ApiAnnotations : strings in warnings do not return SourceText
-------------------------------------+-------------------------------------
        Reporter:  alanz             |                   Owner:  alanz
            Type:  bug               |                  Status:  closed
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:  fixed             |                Keywords:
                                     |  ApiAnnotations
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:  Phab:D907
-------------------------------------+-------------------------------------

Comment (by Sergei Trofimovich <siarheit@…>):

 In [changeset:"b04bed0a391335e70b3c3bdbdccbaa0781697cce/ghc"
 b04bed0a/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="b04bed0a391335e70b3c3bdbdccbaa0781697cce"
 renamer: fix module-level deprecation message

 Noticed today that deprecation warnings are
 slightly broken in -HEAD:

   mtl-2.2.1/Control/Monad/Error/Class.hs:46:1: warning:
     Module ‘Control.Monad.Trans.Error’ is deprecated:
       ([", U, s, e,  , C, o, n, t, r, o, l, ., M, o, n, a, d, ., T, r, a,
         n, s, ., E, x, c, e, p, t,  , i, n, s, t, e, a, d, "],
        Use Control.Monad.Trans.Except instead)

 Commit e6191d1cc37e98785af8b309100ea840084fa3ba
 slightly changed WarningTxt declaration:

 -data WarningTxt = WarningTxt (Located SourceText) [Located FastString]
 -                | DeprecatedTxt (Located SourceText) [Located FastString]
 +data WarningTxt = WarningTxt (Located SourceText)
 +                             [Located (SourceText,FastString)]
 +                | DeprecatedTxt (Located SourceText)
 +                                [Located (SourceText,FastString)]

 But 'moduleWarn' function was not updated to do the stripping.

 Signed-off-by: Sergei Trofimovich <siarheit at google.com>

 Reviewers: austin, bgamari, hvr, goldfire, rwbarton, alanz

 Reviewed By: rwbarton, alanz

 Subscribers: thomie

 Differential Revision: https://phabricator.haskell.org/D1096

 GHC Trac Issues: #10313
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10313#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list