ormolu-0.0.2.0: A formatter for Haskell source code

Safe HaskellNone
LanguageHaskell2010

Ormolu.Printer.SpanStream

Description

Build span stream from AST.

Synopsis

Documentation

newtype SpanStream Source #

A stream of RealSrcSpans in ascending order. This allows us to tell e.g. whether there is another "located" element of AST between current element and comment we're considering for printing.

Constructors

SpanStream [RealSrcSpan] 
Instances
Eq SpanStream Source # 
Instance details

Defined in Ormolu.Printer.SpanStream

Data SpanStream Source # 
Instance details

Defined in Ormolu.Printer.SpanStream

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpanStream -> c SpanStream #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpanStream #

toConstr :: SpanStream -> Constr #

dataTypeOf :: SpanStream -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SpanStream) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpanStream) #

gmapT :: (forall b. Data b => b -> b) -> SpanStream -> SpanStream #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpanStream -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpanStream -> r #

gmapQ :: (forall d. Data d => d -> u) -> SpanStream -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SpanStream -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpanStream -> m SpanStream #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpanStream -> m SpanStream #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpanStream -> m SpanStream #

Show SpanStream Source # 
Instance details

Defined in Ormolu.Printer.SpanStream

Semigroup SpanStream Source # 
Instance details

Defined in Ormolu.Printer.SpanStream

Monoid SpanStream Source # 
Instance details

Defined in Ormolu.Printer.SpanStream

mkSpanStream Source #

Arguments

:: Data a 
=> a

Data structure to inspect (AST)

-> SpanStream 

Create SpanStream from a data structure containing "located" elements.