mirage / repr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zarith support

n-osborne opened this issue · comments

We want to use Repr in ortac to derive equality and comparison functions.
In the logical terms, we use arbitrary precision integers that are represented using Zarith.
That would be nice to have primitive support for the Z.t type.

I think we can't add a direct reprzarith dependency as Zarith pulls GMP (and doesn't build with Dune), but perhaps Repr can expose the right pieces to allow this to be achieved elsewhere, at which point we could consider putting that in a repr-zarith library in this repository.

Is there anything you'd like of this Repr.Zarith.t representation that can't just be achieved by defining a "custom" type with Repr.abstract?

Thanks for the answer.
I didn't know about GMP not building with Dune.
I can use Repr.abstract (nothing missing, more stuff that I need in fact).