ghc-exactprint-0.1.0.0: ExactPrint for GHC

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.GHC.ExactPrint.Types

Synopsis

Documentation

data Comment Source

A Haskell comment. The Bool is True if the comment is multi-line, i.e. {- -}.

Constructors

Comment Bool Span String 

data DComment Source

Delta version of the comment. The initial Int is the column offset that was force when the DeltaPos values were calculated. If this is different when it is output, they deltas must be updated.

type Pos = (Int, Int) Source

type Span = (Pos, Pos) Source

type AnnsEP = Map (SrcSpan, AnnConName) Annotation Source

For every Located a, use the SrcSpan and constructor name of a as the key, to store the standard annotation. These are used to maintain context in the AP and EP monads

type AnnsFinal = Map (SrcSpan, KeywordId) [DeltaPos] Source

The offset values used for actually outputing the source. For a given SrcSpan, in a context managed by the AP or EP monads, store a list of offsets for a particular KeywordId. Mostly there will only be one, but in certain circumstances they are multiple, e.g. semi colons as separators, which can be repeated.

data KeywordId Source

We need our own version of keywordid to distinguish between a semi-colon appearing within an AST element and one separating AST elements in a list.

Constructors

G AnnKeywordId 
AnnSemiSep