Anyone managed to get PPX's working via utop?

195 views
Skip to first unread message

Yaron Minsky

unread,
Sep 26, 2015, 8:10:07 AM9/26/15
to ocaml...@googlegroups.com
Has anyone had luck getting the PPX converters working with opam and utop?  After installing the new packages and #requiring' them in utop, no love:

utop # type t = int [@@deriving compare];;
Cannot locate deriver compare

I can get other ppx_deriving extensions to work just fine, e.g.:

utop # type t = int [@@deriving show];;
type t = int                                                                                                     val pp : Format.formatter -> t -> unit = <fun>                                                   val show : t -> bytes = <fun>

Any ideas what I should do differently?

y

Jeremie Dimino

unread,
Sep 28, 2015, 10:16:44 AM9/28/15
to ocaml...@googlegroups.com
I'm not sure why, but it seems that you need to load ppx_deriving explicitely first:

utop # #require "ppx_deriving";;
utop # #require "ppx_sexp_conv";;
utop # type t = int [@@deriving sexp];;
Error: Unbound module Sexplib

Someone reported it on github too: https://github.com/janestreet/ppx_sexp_conv/issues/1


--
You received this message because you are subscribed to the Google Groups "ocaml-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ocaml-core+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremie
Reply all
Reply to author
Forward
0 new messages