diff --git a/README.adoc b/README.adoc deleted file mode 100644 index bf90996..0000000 --- a/README.adoc +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-License-Identifier: CC-BY-SA-4.0 -= a2ml-haskell -Jonathan D.A. Jewell -:toc: -:toc-placement: preamble - -Haskell library for parsing and rendering A2ML (Attested Markup Language) -— attestation-native markup carrying trust metadata, cryptographic -attestation fields, and provenance information. - -== Overview - -`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 a `Document` back to canonical A2ML. - -* `Data.A2ML.Types` — `Document`, `Block`, `Inline`, `DirectiveName` - (typed sum: `DirAbstract`, `DirRefs`, `DirAttestation`, `DirMeta`, - `DirCustom Text`), `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). - -== Attestation Model - -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. - -== Building - -[source,sh] ----- -cabal build -cabal test ----- - -== Related - -* link:https://github.com/hyperpolymath/a2ml-rs[a2ml-rs] — Rust implementation -* link:https://github.com/hyperpolymath/pandoc-a2ml[pandoc-a2ml] — Pandoc Lua reader/writer - -== License - -MPL-2.0. See link:LICENSE[LICENSE]. diff --git a/README.md b/README.md index 794c624..c870812 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,70 @@ -[![Sponsor](https://img.shields.io/badge/Sponsor-%E2%9D%A4-pink?logo=github)](https://github.com/sponsors/hyperpolymath) + -// SPDX-License-Identifier: CC-BY-SA-4.0 -= a2ml-haskell -Jonathan D.A. Jewell -:toc: -:toc-placement: preamble +Haskell library for parsing and rendering A2ML (Attested Markup +Language) — attestation-native markup carrying trust metadata, +cryptographic attestation fields, and provenance information. -Haskell library for parsing and rendering A2ML (Attested Markup Language) -— attestation-native markup carrying trust metadata, cryptographic -attestation fields, and provenance information. +# Overview -== Overview +`a2ml-haskell` provides a purely functional parser and renderer over +`Text`: -`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.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 a `Document` back to canonical A2ML. -* `Data.A2ML.Renderer` — serialises a `Document` back to canonical A2ML. + -* `Data.A2ML.Types` — `Document`, `Block`, `Inline`, `DirectiveName` +- `Data.A2ML.Types` — `Document`, `Block`, `Inline`, `DirectiveName` (typed sum: `DirAbstract`, `DirRefs`, `DirAttestation`, `DirMeta`, - `DirCustom Text`), `Attestation`, `TrustLevel`, `Manifest`, `Reference`. + `DirCustom` `Text`), `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 Haskell variant uses richer directive syntax than `a2ml-rs`: +directives are multi-line `@name:` `…` `@end` blocks (not single-line +`@name` `value` pairs). -== Attestation Model +# Attestation Model 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 +- `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. +`Manifest` aggregates title, author, version, SPDX license, overall +trust level, and the full attestation list — the entry point for +provenance inspection. -== Building +# Building -[source,sh] ----- +```sh cabal build cabal test ----- +``` + +# Related -== Related +- [a2ml-rs](https://github.com/hyperpolymath/a2ml-rs) — Rust + implementation -* link:https://github.com/hyperpolymath/a2ml-rs[a2ml-rs] — Rust implementation -* link:https://github.com/hyperpolymath/pandoc-a2ml[pandoc-a2ml] — Pandoc Lua reader/writer +- [pandoc-a2ml](https://github.com/hyperpolymath/pandoc-a2ml) — Pandoc + Lua reader/writer -== License +# License -MPL-2.0. See link:LICENSE[LICENSE]. +MPL-2.0. See [LICENSE](LICENSE).