Finch
Copyright(c) Leon Vatthauer 2026
LicenseGPL-3
MaintainerLeon Vatthauer <leon.vatthauer@fau.de>
Stabilityexperimental
Portabilitynon-portable (ghc-wasm-meta)
Safe HaskellNone
LanguageGHC2024

Parser.IncompleteProof

Description

This module defines a compact serialization format for Proofs using ASCII control characters, and a corresponding parser for deserialization. This format is used for encoding Proofs in URLs via tURLDecoder.

In contrast to Parser.Proof this can also parse incomplete Proofs, i.e. ones with parse errors.

Synopsis

Serialization

safeParsePrint :: Proof -> Text Source #

Serializes a Proof to a compact Text representation using ASCII control characters as delimiters, suitable for later re-parsing with parseIncompleteProof.

Legend of control characters:

Parsers

pIncompleteDerivation :: Parser m => m Derivation Source #

Parses a single Derivation from the serialization format produced by safeParsePrint. The Formula and RuleApplication fields are left as Unparsed wrappers and are re-parsed later by the application.

pIncompleteAssumption :: Parser m => m Assumption Source #

Parses a single Assumption from the serialization format produced by safeParsePrint. Both the Formula and RuleApplication fields are left as Unparsed wrappers and are re-parsed later by the application.

pIncompleteProof :: Parser m => m Proof Source #

Parses a full Proof from the serialization format produced by safeParsePrint.

Entry point

parseIncompleteProof :: Text -> Maybe Proof Source #

Deserializes a Proof from a Text produced by safeParsePrint. Returns Nothing if parsing fails.