Это мой ocamlinit:Как настроить ocamlinit так, чтобы ppx работал?
(* Added by OPAM. *)
let() =
try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
with Not_found ->()
;;
(* ## added by OPAM user-setup for ocamltop/base ## 3ec62baf6f9c219ae06d9814069da862 ## you can edit, but keep this line *)
#use "topfind";;
(* ## end of OPAM user-setup addition for ocamltop/base ## keep this line *)
#thread;;
(* #ppx "ppx-jane -as-ppx";; *)
#require "ppx_jane";;
#require "core.top";;
#require "async";;
#require "core_extended";;
open Core.Std;;
С этим точно, я получаю это в utop
utop # type test = char list [@@deriving show];;
Error: Cannot locate deriver show
Если я использую строку, начинающуюся с #ppx
вместо #require "ppx_jane"
, я получаю эту ошибку
utop # type test = char list [@@deriving show];;
Error: ppx_type_conv: 'show' is not a supported type type-conv generator
Как настроить ocamlinit для использования [@@deriving show]
?
Я пытался, но я не получил 'Нет такого пакета: deriving.show'. – ackerleytng