简体   繁体   中英

How to deal with the error: Unbound module Sys_unix

I've encountered the error Unbound module Sys_unix`.

The code in utop is:

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 .

Here's the documentation: 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 .

I would expect this to work, assuming you have installed the package:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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