ormolu-0.1.4.0: A formatter for Haskell source code
Safe HaskellNone
LanguageHaskell2010

Ormolu.Printer.Comments

Description

Helpers for formatting of comments. This is low-level code, use Ormolu.Printer.Combinators unless you know what you are doing.

Synopsis

Documentation

spitPrecedingComments Source #

Arguments

:: RealSrcSpan

Span of the element to attach comments to

-> R () 

Output all preceding comments for an element at given location.

spitFollowingComments Source #

Arguments

:: RealSrcSpan

Span of the element to attach comments to

-> R () 

Output all comments following an element at given location.

spitRemainingComments :: R () Source #

Output all remaining comments in the comment stream.

spitCommentNow :: RealSrcSpan -> Comment -> R () Source #

Output a Comment immediately. This is a low-level printing function.

spitCommentPending :: CommentPosition -> RealSrcSpan -> Comment -> R () Source #

Output a Comment at the end of correct line or after it depending on CommentPosition. Used for comments that may potentially follow on the same line as something we just rendered, but not immediately after it.