Safe Haskell | None |
---|---|
Language | Haskell2010 |
OrmoluException
type and surrounding definitions.
Synopsis
- data OrmoluException
- = OrmoluCppEnabled FilePath
- | OrmoluParsingFailed SrcSpan String
- | OrmoluOutputParsingFailed SrcSpan String
- | OrmoluASTDiffers FilePath [SrcSpan]
- | OrmoluNonIdempotentOutput RealSrcLoc Text Text
- | OrmoluUnrecognizedOpts (NonEmpty String)
- withPrettyOrmoluExceptions :: IO a -> IO a
Documentation
data OrmoluException Source #
Ormolu exception representing all cases when Ormolu can fail.
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 |
Instances
Eq OrmoluException Source # | |
Defined in Ormolu.Exception (==) :: OrmoluException -> OrmoluException -> Bool # (/=) :: OrmoluException -> OrmoluException -> Bool # | |
Show OrmoluException Source # | |
Defined in Ormolu.Exception showsPrec :: Int -> OrmoluException -> ShowS # show :: OrmoluException -> String # showList :: [OrmoluException] -> ShowS # | |
Exception OrmoluException Source # | |
Defined in Ormolu.Exception |
withPrettyOrmoluExceptions Source #
Inside this wrapper OrmoluException
will be caught and displayed
nicely using displayException
.