| Copyright | (c) Leon Vatthauer 2026 |
|---|---|
| License | GPL-3 |
| Maintainer | Leon Vatthauer <leon.vatthauer@fau.de> |
| Stability | experimental |
| Portability | non-portable (ghc-wasm-meta) |
| Safe Haskell | None |
| Language | GHC2024 |
Parser.Rule
Contents
Description
This module defines parsers for RuleApplications and References.
Synopsis
- pLine :: Parser m => m Int
- pReference :: Parser m => m Reference
- pRule :: Parser m => m RuleApplication
- parseRuleApplication :: Int -> Text -> Either Text RuleApplication
Parsers
pReference :: Parser m => m Reference Source #
Parses a Reference: either a ProofReference (a line range m-n)
or a LineReference (a single line number n).
pRule :: Parser m => m RuleApplication Source #
Parses a RuleApplication: a rule name enclosed in parentheses,
followed by a comma-separated list of References.
Entry point
Arguments
| :: Int | Line number, used to anchor error positions. |
| -> Text | Input |
| -> Either Text RuleApplication |
Parses a RuleApplication from a Text.
Returns Left with a human-readable error message on failure,
or Right with the parsed RuleApplication on success.