{-# LANGUAGE RecordWildCards #-}
module Ormolu.Printer
( printModule,
)
where
import Data.Text (Text)
import Ormolu.Parser.Result
import Ormolu.Printer.Combinators
import Ormolu.Printer.Meat.Module
import Ormolu.Printer.SpanStream
printModule ::
ParseResult ->
Text
printModule :: ParseResult -> Text
printModule ParseResult {..} =
R () -> SpanStream -> CommentStream -> Anns -> Bool -> Text
runR
([Located String] -> [Pragma] -> ParsedSource -> R ()
p_hsModule [Located String]
prShebangs [Pragma]
prExtensions ParsedSource
prParsedSource)
(ParsedSource -> SpanStream
forall a. Data a => a -> SpanStream
mkSpanStream ParsedSource
prParsedSource)
CommentStream
prCommentStream
Anns
prAnns
Bool
prUseRecordDot