{-# LANGUAGE RecordWildCards #-}
module Ormolu.Parser.Result
( ParseResult (..),
prettyPrintParseResult,
)
where
import GHC
import Ormolu.Parser.Anns
import Ormolu.Parser.CommentStream
import Ormolu.Parser.Pragma (Pragma)
data ParseResult
= ParseResult
{
ParseResult -> ParsedSource
prParsedSource :: ParsedSource,
ParseResult -> Anns
prAnns :: Anns,
:: CommentStream,
ParseResult -> [Pragma]
prExtensions :: [Pragma],
ParseResult -> [Located String]
prShebangs :: [Located String],
ParseResult -> Bool
prUseRecordDot :: Bool
}
prettyPrintParseResult :: ParseResult -> String
prettyPrintParseResult :: ParseResult -> String
prettyPrintParseResult ParseResult {..} =
[String] -> String
unlines
[ "parse result:",
" comment stream:",
CommentStream -> String
showCommentStream CommentStream
prCommentStream
]