ormolu-0.1.2.0: A formatter for Haskell source code

Safe Haskell | None
Language | Haskell2010

Ormolu.Parser.Result

Description

A type for result of parsing.

Synopsis

- data ParseResult = ParseResult {
  - prParsedSource :: HsModule GhcPs
  - prAnns :: Anns
  - prStackHeader :: Maybe (RealLocated Comment)
  - prShebangs :: [Shebang]
  - prPragmas :: [([RealLocated Comment], Pragma)]
  - prCommentStream :: CommentStream
  - prUseRecordDot :: Bool
  - prImportQualifiedPost :: Bool
  - prLiteralPrefix :: Text
  - prLiteralSuffix :: Text
  - prIndent :: Int
  }
- prettyPrintParseResult :: ParseResult -> String

# Documentation

data ParseResult Source #

A collection of data that represents a parsed module in Ormolu.

Constructors

ParseResult |

Fields

- prParsedSource :: HsModule GhcPs

  `ParsedSource` from GHC

- prAnns :: Anns

  Ormolu-specfic representation of annotations

- prStackHeader :: Maybe (RealLocated Comment)

  Stack header

- prShebangs :: [Shebang]

  Shebangs found in the input

- prPragmas :: [([RealLocated Comment], Pragma)]

  Pragmas and the associated comments

- prCommentStream :: CommentStream

  Comment stream

- prUseRecordDot :: Bool

  Whether or not record dot syntax is enabled

- prImportQualifiedPost :: Bool

  Whether or not ImportQualifiedPost is enabled

- prLiteralPrefix :: Text

  Literal prefix

- prLiteralSuffix :: Text

  Literal suffix

- prIndent :: Int

  Indentation level, can be non-zero in case of region formatting

prettyPrintParseResult :: ParseResult -> String Source #

Pretty-print a `ParseResult`.