Where can I find the OCaml Option module?

ぐ巨炮叔叔 提交于 2020-01-03 09:12:28

问题


I mean this module : Option

I can't find it, open Option gives me Error: Unbound module Option and there is no 'option.cma' file

Is it in the standard library ? Is it named 'option.cma' ?


回答1:


This is not part of the OCaml standard library, no. It looks like it might be part of a former library named Extlib. Extlib, in turn, seems to have become part of OCaml Batteries Included. The Option module is now named BatOption.

If you want this module, you should get OCaml Batteries Included. Then you need to tell the OCaml compiler how to find the library. It will be explained in the installation instructions for Batteries.



来源:https://stackoverflow.com/questions/9914219/where-can-i-find-the-ocaml-option-module

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