Inconsistent assumptions over interface (Ocaml)

丶灬走出姿态 提交于 2019-12-05 11:11:38

问题


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

回答1:


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?




回答2:


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



来源:https://stackoverflow.com/questions/9166489/inconsistent-assumptions-over-interface-ocaml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!