Skip to content

Commit

Permalink
Fix invariant_set elements schema in YAML witnesses
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Nov 21, 2023
1 parent 0ee71a0 commit 8b79948
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/witness/yamlWitnessType.ml
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,16 @@ struct
}

let to_yaml {invariant_type} =
`O ([
("type", `String (InvariantType.invariant_type invariant_type));
] @ InvariantType.to_yaml' invariant_type)
`O [
("invariant", `O ([
("type", `String (InvariantType.invariant_type invariant_type));
] @ InvariantType.to_yaml' invariant_type)
)
]

let of_yaml y =
let open GobYaml in
let+ invariant_type = y |> InvariantType.of_yaml in
let+ invariant_type = y |> find "invariant" >>= InvariantType.of_yaml in
{invariant_type}
end

Expand Down

0 comments on commit 8b79948

Please sign in to comment.