Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Language.Giml.Syntax.Parse.API
Contents
Description
Parser API
Synopsis
- runParser :: CompilePhase Text env b m => Parser a -> FilePath -> Text -> m a
- parse :: Parser e -> Text -> Either Text e
- readError :: forall m a. (Read a, Typeable a, MonadError ParseErr m, MonadFail m) => String -> m a
- pp :: Text -> IO ()
- ppA :: Text -> IO ()
- ppd :: Text -> IO ()
- ppt :: Text -> IO ()
- ppErrors :: (TraversableStream a, VisualStream a) => ParseErrorBundle a Void -> Text
API
runParser :: CompilePhase Text env b m => Parser a -> FilePath -> Text -> m a Source #
Lexer and parser stream runParser :: Parser e -> FilePath -> Text -> Either (Either ErrBundle ParseErr) e
Debugging stuff
readError :: forall m a. (Read a, Typeable a, MonadError ParseErr m, MonadFail m) => String -> m a Source #
It's like read
, but actually useful.
ppErrors :: (TraversableStream a, VisualStream a) => ParseErrorBundle a Void -> Text Source #