{-# 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.Config (SourceType)
import Ormolu.Fixity (FixityMap, LazyFixityMap)
import Ormolu.Parser.CommentStream
import Ormolu.Parser.Pragma (Pragma)
data SourceSnippet = RawSnippet Text | ParsedSnippet ParseResult
data ParseResult = ParseResult
{
ParseResult -> HsModule
prParsedSource :: HsModule,
ParseResult -> SourceType
prSourceType :: SourceType,
:: Maybe (RealLocated Comment),
ParseResult -> [([RealLocated Comment], Pragma)]
prPragmas :: [([RealLocated Comment], Pragma)],
:: CommentStream,
ParseResult -> EnumSet Extension
prExtensions :: EnumSet Extension,
ParseResult -> FixityMap
prFixityOverrides :: FixityMap,
ParseResult -> LazyFixityMap
prFixityMap :: LazyFixityMap,
ParseResult -> Int
prIndent :: Int
}