verse-lab / ego

EGraphs in OCaml
https://verse-lab.github.io/ego/ego/index.html
GNU General Public License v3.0
60 stars 6 forks source link

Compilation error #2

Closed jonathan-laurent closed 3 years ago

jonathan-laurent commented 3 years ago

First of all, thanks for developing this great library! This is exactly what I was looking for.

I just tried to compile the dev version of this library but I got the following error:

File "ego/lib/generic.ml", line 354, characters 50-64:
354 |       let cls2 = self.@[remove_class_data] id2 |> Option.get_exn in
Error (alert deprecated): Containers.Option.get_exn
use CCOpt.get_exn_or instead

The problem is indeed with this line: https://github.com/verse-lab/ego/blob/5daf312f8a444f9abcde5996c671b9282727a972/lib/generic.ml#L350

which is attempting to use Option.get_exn. This function exists in Base but not in Stdlib.

Fix

A simple fix is to replace this line by:

      let[@warning "-8"] Some cls2 = self.@[remove_class_data] id2 in

I am happy to make a PR if that's convenient to you.

kiranandcode commented 3 years ago

HI! Thanks for the issue! Yes, I guess Containers has deprecated Option.get_exn - there are a couple of other fixes I've been thinking about making, so I'll do them all at once and update the library later today

kiranandcode commented 3 years ago

Thanks, fixed it in 4549de, and added a new release. Anyway, I'm glad to hear that this library is useful for others, pull requests are welcome.