Safe Haskell | None |
---|---|
Language | Haskell2010 |
- parsePrintModule :: Config -> Text -> IO (Either [BrittanyError] Text)
- parsePrintModuleTests :: Config -> String -> Text -> IO (Either String Text)
- pPrintModule :: Config -> Anns -> ParsedSource -> ([BrittanyError], Text)
- pPrintModuleAndCheck :: Config -> Anns -> ParsedSource -> IO ([BrittanyError], Text)
- parseModule :: [String] -> FilePath -> (DynFlags -> IO (Either String a)) -> IO (Either String (Anns, ParsedSource, a))
- parseModuleFromString :: [String] -> FilePath -> (DynFlags -> IO (Either String a)) -> String -> IO (Either String (Anns, ParsedSource, a))
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.
pPrintModule :: Config -> Anns -> ParsedSource -> ([BrittanyError], Text) Source #
pPrintModuleAndCheck :: Config -> Anns -> ParsedSource -> IO ([BrittanyError], Text) Source #
Additionally checks that the output compiles again, appending an error if it does not.