• Alan Zimmerman's avatar
    Work SourceText in for all integer literals · 3a1babd6
    Alan Zimmerman authored
    Certain syntactic elements have integers in them, such as fixity
    specifications, SPECIALISE pragmas and so on.
    The lexer will accept mult-radix literals, with arbitrary leading zeros
    in these.
    Bring in a SourceText field to each affected AST element to capture the
    original literal text for use with API Annotations.
    Affected hsSyn elements are
         -- See note [Pragma source text]
         data Activation = NeverActive
                         | AlwaysActive
                         | ActiveBefore SourceText PhaseNum
                              -- Active only *strictly before* this phase
                         | ActiveAfter SourceText PhaseNum
                               -- Active in this phase and later
                         deriving( Eq, Data, Typeable )
                                   -- Eq used in comparing rules in HsDecls
         data Fixity = Fixity SourceText Int FixityDirection
           -- Note [Pragma source text]
           deriving (Data, Typeable)
          | HsTickPragma         -- A pragma introduced tick
             SourceText           -- Note [Pragma source text] in BasicTypes
                                              -- external span for this tick
                -- Source text for the four integers used in the span.
                -- See note [Pragma source text] in BasicTypes
             (LHsExpr id)
    Updates haddock submodule
    Test Plan: ./validate
    Reviewers: goldfire, bgamari, austin
    Reviewed By: bgamari
    Subscribers: thomie, mpickering
    Differential Revision: https://phabricator.haskell.org/D1781
    GHC Trac Issues: #11430
RnTypes.hs 68.2 KB