Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Telescope.Data.Parser
Synopsis
- data Parser :: Effect where
- runParser :: Error ParseError :> es => Eff (Parser : es) a -> Eff es a
- runParserPure :: Eff '[Parser, Error ParseError] a -> Either ParseError a
- data ParseError = ParseFailure Path String
- newtype Path = Path [Ref]
- data Ref
- expected :: (Show value, Parser :> es) => String -> value -> Eff es a
- parseFail :: Parser :> es => String -> Eff es a
- parseAt :: Parser :> es => Ref -> Eff es a -> Eff es a
Documentation
data Parser :: Effect where Source #
Instances
type DispatchOf Parser Source # | |
Defined in Telescope.Data.Parser |
runParserPure :: Eff '[Parser, Error ParseError] a -> Either ParseError a Source #
data ParseError Source #
Constructors
ParseFailure Path String |
Instances
Exception ParseError Source # | |
Defined in Telescope.Data.Parser Methods toException :: ParseError -> SomeException # fromException :: SomeException -> Maybe ParseError # displayException :: ParseError -> String # | |
Show ParseError Source # | |
Defined in Telescope.Data.Parser Methods showsPrec :: Int -> ParseError -> ShowS # show :: ParseError -> String # showList :: [ParseError] -> ShowS # | |
Eq ParseError Source # | |
Defined in Telescope.Data.Parser |
Tracks the location of the parser in the document for error messages