Skip to content

Commit

Permalink
change csp printing to make it idempotent
Browse files Browse the repository at this point in the history
  • Loading branch information
ghilesZ committed Feb 29, 2024
1 parent 2ffd037 commit db5d6de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/polygons.ml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ let () =
match int_of_string_opt Sys.argv.(1) with
| Some nb_points ->
let csp = build_csp nb_points in
Format.printf "%a\n" Csp.print csp
(* Csp.to_graphviz csp (Format.sprintf "convex%i.viz" nb_points) *)
Format.printf "%a\n" Csp.print csp ;
Csp.to_graphviz csp (Format.sprintf "convex%i.viz" nb_points)
| None ->
Format.printf "expecting numeric argument %s\n" Sys.argv.(1) ;
exit 1
2 changes: 1 addition & 1 deletion lib/lang/csp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ let pp_typ fmt = function
| Real -> Format.fprintf fmt "real"

let pp_decl fmt (a, b, c) =
Format.fprintf fmt "%a %s in %a" pp_typ a b Dom.print c
Format.fprintf fmt "%a %s = %a" pp_typ a b Dom.print c

let pp_declarations = pp_list_sep ";\n" pp_decl

Expand Down

0 comments on commit db5d6de

Please sign in to comment.