繁体   English   中英

如何处理错误:Unbound module Sys_unix

[英]How to deal with the error: Unbound module Sys_unix

我遇到了错误 Unbound module Sys_unix`。

utop中的代码是:

utop # #require "core_unix";;
utop # open Core;;
utop # open Core_unix;;
utop # open Sys;;
utop # open Core_unix.Sys_unix;;
Error: Unbound module Core_unix.Sys_unix
utop # Sys.readdir "/Users/";;
Line 1, characters 0-11:
Alert deprecated: Core.Sys.readdir
[since 2021-04] Use [Sys_unix]
Line 1, characters 0-11:
Alert deprecated: Core.Sys.readdir
[since 2021-04] Use [Sys_unix]
- : [ `Use_Sys_unix ] = `Use_Sys_unix
utop # Sys_unix.readdir;;
Error: Unbound module Sys_unix

我不知道为什么,我什至找不到有关模块Sys_unix的文档。

这是文档: https://ocaml.org/p/core_unix/v0.15.0/doc/Sys_unix/index.html

该模块似乎在core_unix.sys_unix中,它在package core_unix

我希望它能工作,假设你已经安装了 package:

#require "core_unix.sys_unix";;
open Sys_unix;;

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM