Closed gltrost closed 3 years ago
I mark this as "approved," because my suggestions are just suggestions. Greg, make whichever of my suggested changes you like, and then feel free to merge.
My comments pertain to
constraint.ml
:
- Line 50 et al: maybe change
rem
torm
, sincerm
is a common abbreviation forremove
?- Line 250: maybe change
form
tofmt
, sincefmt
is an established abbreviation for formatter arguments? Also, in theprint_expr_list
andto_color
functions, maybe also usefmt
instead ofch
for the formatter arguments? (I can't quite figure out whatch
is supposed to stand for...)- Line 250: For what it's worth, I'm a fan of using
t
as the argument name for the constraint. The wordcons
usually means something else in functional programming.- Line 256: you can use punning here: write
goal_to_string ~colorful g
instead ofgoal_to_string ~colorful:colorful g
.- Line 273: can you use
to_color
here instead of manually adding the escape tags?- Line 282: can you delete this line?
Other comments:
- I would print the goal names as yellow instead of red. Red is usually used to signal errors in terminal output.
- For the
pp_constr
function, I'd probably make the first argument a named argument~colorful
. Then in theconstraint.mli
file it is easier to understand what it's for.Otherwise, looks good! I like how simple you get this stuff boiled down to.
I like all of these recommendations. I'll get them added and will then merge. Thanks!
There are several problems currently with printing
Constr.t
-values. Some of these issues are\n
and\\
let
andin
when printing() => ...
which don't need to be shown.ITE
instead ofif ... then ... else
This branch attempts to address or fix all of these issues, mainly by adding changes to
Constr.pp_constr
.With these changes, reading
Constr.t
statements with flags likeshow="precond-internal"
will be much easier.