{-# LANGUAGE RecordWildCards #-}
module Ormolu.Parser.Result
( SourceSnippet (..),
ParseResult (..),
)
where
import Data.Text (Text)
import GHC.Data.EnumSet (EnumSet)
import GHC.Hs
import GHC.LanguageExtensions.Type
import GHC.Types.SrcLoc
import Ormolu.Parser.Anns
import Ormolu.Parser.CommentStream
import Ormolu.Parser.Pragma (Pragma)
data SourceSnippet = RawSnippet Text | ParsedSnippet ParseResult
data ParseResult = ParseResult
{
ParseResult -> HsModule
prParsedSource :: HsModule,
ParseResult -> Anns
prAnns :: Anns,
:: Maybe (RealLocated Comment),
ParseResult -> [([RealLocated Comment], Pragma)]
prPragmas :: [([RealLocated Comment], Pragma)],
:: CommentStream,
ParseResult -> Bool
prUseRecordDot :: Bool,
ParseResult -> EnumSet Extension
prExtensions :: EnumSet Extension,
ParseResult -> Int
prIndent :: Int
}