[英]How properly add str module to oasis config?
我现在有什么:
_oasis文件:
OASISFormat: 0.4
Name: Count Lines
Version: 0.0.1
Synopsis: Counts the number of lines in the project
Authors: Bogdan Nechyporenko
License: LGPL-2.1 with OCaml linking exception
Executable "count-lines"
Path: src
BuildTools: ocamlbuild
BuildDepends: str
MainIs: main.ml
src / main.ml:
open Str ;;
let endswith s1 s2 =
let re = Str.regexp (Str.quote s2 ^ "$")
in
try ignore (Str.search_forward re s1 0); true
with Not_found -> false
我正在运行命令来构建它:
ocaml setup.ml -build
如果有人对答案感兴趣,则在修改您自己的_oasis文件后,您需要运行“ oasis setup”来进行修改。
愚蠢的我,感谢IRC中的Drup #ocaml聊天!!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.