在OCaml顶层使用Str模块? [英] Using Str module in OCaml top level?

查看:118
本文介绍了在OCaml顶层使用Str模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了两个命令以在OCaml顶层加载Str模块. 第一个命令给我错误找不到文件Str.cmo". 然后,我尝试使用第二个命令在顶层使用的文件.通过该命令,我得到了参考未定义的全局Str".

I tried two commands to load Str Module in OCaml top level. The first command gives me the error "Cannot find file Str.cmo". I then tried to use the file i was using in top level with the second command. With that command i got "Reference to undefined global Str".

#load "Str.cmo";;

#use "my_file.ml";;

要在OCaml顶层成功加载Str模块,我需要做些什么.

What do i need to do to successfully load Str module in OCaml top level.

推荐答案

# #use "topfind"
# #require "str"

这篇关于在OCaml顶层使用Str模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆