我正在編寫一個轉到Python編譯器的OCamllex和Menhir,但是我的詞法分析器無法導入Core包。 這裏是我的lex.mll文件: {
(* Header *)
open Core.Std
open Lexing
open Parser
exception SyntaxError of string
let next_li
OCaml語言的核心庫附帶非常有用的地圖和表格模塊。 我知道如何定義自己的類型,如果我想使用一些內置類型的地圖: type mytype = int String.Map.t (* A mapping from strings to integers *)
我也知道了如何定義多態的自定義地圖比較: type mytype = (string, string) Map.Poly.t (* A m
我遇到corebuild問題。我寫了以下程序: open Core.Std
open Smtp
type person = {
name: string;
address: Smtp_unix.Addr.t
}
let send p1 p2 =
Smtp_unix.sendmail ~host:"gmail.google.fr"
~name:"g