ormolu-0.0.2.0: A formatter for Haskell source code

Safe HaskellNone
LanguageHaskell2010

Ormolu.Exception

Description

OrmoluException type and surrounding definitions.

Synopsis

Documentation

data OrmoluException Source #

Ormolu exception representing all cases when Ormolu can fail.

Constructors

OrmoluCppEnabled FilePath

Ormolu does not work with source files that use CPP

OrmoluParsingFailed SrcSpan String

Parsing of original source code failed

OrmoluOutputParsingFailed SrcSpan String

Parsing of formatted source code failed

OrmoluASTDiffers FilePath [SrcSpan]

Original and resulting ASTs differ

OrmoluNonIdempotentOutput RealSrcLoc Text Text

Formatted source code is not idempotent

OrmoluUnrecognizedOpts (NonEmpty String)

Some GHC options were not recognized

withPrettyOrmoluExceptions Source #

Arguments

:: IO a

Action that may throw the exception

-> IO a 

Inside this wrapper OrmoluException will be caught and displayed nicely using displayException.