Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inconsistent assumptions over interface (Ocaml)

I suddenly started to get this error. I don't know how to diagnose or fix it. Am I supposed to grep through bar.ml and check every Big_int function against signature in Big_int.mli?

File "foo.ml", line 1, characters 0-1:
Error: The files /home/bar.cmi
       and /usr/lib/ocaml/big_int.cmi make inconsistent assumptions
       over interface Big_int
like image 575
pbp Avatar asked Feb 06 '12 20:02

pbp


2 Answers

Generally this message means that one .mli file has been recompiled recently but not the other. Since one of the .mli files is in your OCaml library, it might mean that you've upgraded your OCaml installation but haven't recompiled bar.mli since then.

What happens if you just recompile bar.mli?

like image 80
Jeffrey Scofield Avatar answered Nov 16 '22 15:11

Jeffrey Scofield


rm bar.cmi and try again; it looks like it was generated against a different version of Big_int.

like image 24
Asherah Avatar answered Nov 16 '22 15:11

Asherah