简体   繁体   English

如何处理错误:Unbound module Sys_unix

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

I've encountered the error Unbound module Sys_unix`.我遇到了错误 Unbound module Sys_unix`。

The code in utop is: 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

I don't know why and I can't even find a documentation about module Sys_unix .我不知道为什么,我什至找不到有关模块Sys_unix的文档。

Here's the documentation: https://ocaml.org/p/core_unix/v0.15.0/doc/Sys_unix/index.html这是文档: https://ocaml.org/p/core_unix/v0.15.0/doc/Sys_unix/index.html

The module seems to be in the library core_unix.sys_unix , which is in the package core_unix .该模块似乎在core_unix.sys_unix中,它在package core_unix

I would expect this to work, assuming you have installed the package:我希望它能工作,假设你已经安装了 package:

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

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

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