Haskell library for parsing and rendering A2ML (Attested Markup Language) — attestation-native markup carrying trust metadata, cryptographic attestation fields, and provenance information.
a2ml-haskell provides a purely functional parser and renderer over
Text:
-
Data.A2ML.Parser— `parseA2ML
Text → Either ParseError Document`. Line-oriented, no regex, no mutable state. Recognises headings, multi-line directive blocks (@name:…@end), bullet lists, and inline formatting. -
Data.A2ML.Renderer— serialises aDocumentback to canonical A2ML.
Data.A2ML.Types—Document,Block,Inline,DirectiveName(typed sum:DirAbstract,DirRefs,DirAttestation,DirMeta,DirCustomText),Attestation,TrustLevel,Manifest,Reference.
The Haskell variant uses richer directive syntax than a2ml-rs:
directives are multi-line @name: … @end blocks (not single-line
@name value pairs).
The Attestation type carries:
-
attestationSigner— identity of the signing agent or person -
attestationAlgorithm— e.g."ed25519"or"sha256" -
attestationSignature— hex or base64 signature (opaque, not verified here) -
attestationTimestamp— optional ISO-8601 timestamp
TrustLevel encodes attestor count and independence: Unsigned →
SelfAttested → ThirdPartyAttested → MultiAttested.
Manifest aggregates title, author, version, SPDX license, overall
trust level, and the full attestation list — the entry point for
provenance inspection.
cabal build
cabal test-
a2ml-rs — Rust implementation
-
pandoc-a2ml — Pandoc Lua reader/writer
MPL-2.0. See LICENSE.