Global switch to enable debug tracing in ghc-exactprint Delta / Print
Moduleghc-exactprint-1.10.0.0Haskell2010
Language.Haskell.GHC.ExactPrint.Utils
- 2 types
- 71 values
- Packageghc-exactprint-1.10.0.0
- Exports73
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceUtils.hs
Provide a version of trace that comes at the end of the line, so it can easily be commented out when debugging different things.
A good delta has no negative values.
Create a delta from the current position to the start of the given
RealSrcSpan.
create a delta from the end of a current span. The +1 is because the stored position ends up one past the span, this is prior to that adjustment
create a delta from the start of a current span. The +1 is because the stored position ends up one past the span, this is prior to that adjustment
Convert the start of the second Pos to be an offset from the
first. The assumption is the reference starts before the second Pos
Apply the delta to the current position, taking into account the current column offset if advancing to a new line
Useful for debug dumps
Checks whether a SrcSpan has zero length.
A GHC comment includes the span of the preceding token. Take an
original comment, and convert the 'Anchor to have a have a
MovedAnchor operation based on the original location, only if it
does not already have one.
Insert the comments at the appropriate places in the AST
Must compare without span filenames, for CPP injected comments with fake filename
Sort, comparing without span filenames, for CPP injected comments with fake filename
Sort, comparing without span filenames, for CPP injected comments with fake filename
Makes a comment which originates from a specific keyword.
Calculates the distance from the start of a string to the end of a string.