| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Yamlet.Internal.Parser.Hints
Description
The messages of parse errors. The parser only knows the position at which it failed, so these functions look at the input around it to name the likely mistake, e.g. a missing colon after a key.
This module is intended for internal use only, and may change without warning in subsequent releases.
Synopsis
- unexpected :: Env -> Int -> (Maybe Int, (Int, String))
- flowError :: Env -> Int -> String -> (Int, String)
- codePointName :: Char -> String
- firstTab :: Env -> Int -> Int -> Maybe Int
- tabMessage :: String
- keyLengthMessage :: String
Documentation
unexpected :: Env -> Int -> (Maybe Int, (Int, String)) Source #
The location and the message of the error for the furthest position at
which the parser failed, and a tab before the position on its line that
can be the cause instead, with tabMessage.
flowError :: Env -> Int -> String -> (Int, String) Source #
The location and the message of the error at the index inside a flow collection: a common mistake if the input there shows one, or else the index and the given message.
codePointName :: Char -> String Source #
The code point of a character, e.g. U+0007, for a character that an error cannot show.
firstTab :: Env -> Int -> Int -> Maybe Int Source #
The first tab from the first index to before the second.
tabMessage :: String Source #
keyLengthMessage :: String Source #