rems-project / lem

Lem semantic definition language
Other
130 stars 15 forks source link

Use Zarith in Nat_num instead of ocaml-num #8

Closed emersion closed 6 years ago

emersion commented 6 years ago

This fixes the compilation on OCaml 4.06.

I've no idea why nat_num.ml{i,} were using directly Big_int over our Big_int_impl wrappers. There's a chance it always picked the ocaml-num implementation.

Also run-ocaml-tests.sh was requiring nums.cma - no idea why.

All the tests pass with this patch.

There's some noise because of trailing whitespace chars, but w/e.

fshaked commented 6 years ago

I suspect Nat_num.natural predates Nat_big_num, which subsumes it. I don't think Natnum.natural is used anywhere. Hence, the right thing to do is to just remove type natural (and the natural* functions) from Nat_num, which will eliminate all Big_int references from Nat_num.

emersion commented 6 years ago

I suspect Nat_num.natural predates Nat_big_num, which subsumes it. I don't think Natnum.natural is used anywhere. Hence, the right thing to do is to just remove type natural (and the natural* functions) from Nat_num, which will eliminate all Big_int references from Nat_num.

Thanks for the review. Just done that, works, all tests pass.