brittany-0.8.0.2: Haskell source code formatter

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Brittany.Internal

Synopsis

Documentation

parsePrintModule :: Config -> Text -> IO (Either [BrittanyError] Text) Source #

Exposes the transformation in an pseudo-pure fashion. The signature contains IO due to the GHC API not exposing a pure parsing function, but there should be no observable effects.

Note that this function ignores/resets all config values regarding debugging, i.e. it will never use trace/write to stderr.

pPrintModuleAndCheck :: Config -> Anns -> ParsedSource -> IO ([BrittanyError], Text) Source #

Additionally checks that the output compiles again, appending an error if it does not.