Skip to content

Commit

Permalink
Implement YamlWitnessType.Entry pretty-printing
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Nov 21, 2024
1 parent 3a07c16 commit 9a3a338
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/witness/yamlWitnessType.ml
Original file line number Diff line number Diff line change
Expand Up @@ -693,12 +693,6 @@ struct

let name () = "YAML entry"

let show _ = "TODO"
include Printable.SimpleShow (struct
type nonrec t = t
let show = show
end)

let to_yaml {entry_type; metadata} =
`O ([
("entry_type", `String (EntryType.entry_type entry_type));
Expand All @@ -710,4 +704,10 @@ struct
let+ metadata = y |> find "metadata" >>= Metadata.of_yaml
and+ entry_type = y |> EntryType.of_yaml in
{entry_type; metadata}

let pp ppf x = Yaml.pp ppf (to_yaml x)
include Printable.SimpleFormat (struct
type nonrec t = t
let pp = pp
end)
end

0 comments on commit 9a3a338

Please sign in to comment.