Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using [@@deriving show] with Set.Make #173

Closed
astefano opened this issue Sep 22, 2018 · 2 comments
Closed

using [@@deriving show] with Set.Make #173

astefano opened this issue Sep 22, 2018 · 2 comments

Comments

@astefano
Copy link

Hi,

i'd like to use [@@deriving show] with Set.Make. More precisely, i have this code:

module IntSet = Set.Make(struct
                    type t = int (* [@@deriving show] *)
                    let compare = compare end) [@@deriving show]
              
type value = IntSet.t  [@@deriving show] 
type state_fun = (int * value) list [@@deriving show] 

for which i get this error:

(cd _build/default && /home/eugen/.opam/4.06.0/bin/ocamlopt.opt -w -40 -g -I .main.eobjs -I /home/eugen/.opam/4.06.0/lib/ppx_deriving -I /home/eugen/.opam/4.06.0/lib/result -intf-suffix .ml -no-alias-deps -o .main.eobjs/state_fun.cmx -c -impl state_fun.pp.ml)

File "_none_", line 1:

Error: Unbound value IntSet.pp
      ocamlc .main.eobjs/program.{cmi,cmo,cmt} (exit 2)
(cd _build/default && /home/eugen/.opam/4.06.0/bin/ocamlc.opt -w -40 -g -bin-annot -I .main.eobjs -I /home/eugen/.opam/4.06.0/lib/ppx_deriving -I /home/eugen/.opam/4.06.0/lib/result -no-alias-deps -o .main.eobjs/program.cmo -c -impl program.pp.ml)

File "_none_", line 1:

Error: Unbound value pp_state_fun

Is there a way to get rid of this error?

Thank you,
Lacramioara

@whitequark
Copy link
Collaborator

This is not currently supported, unfortunately.

@astefano
Copy link
Author

ok, thanks, we found another way (by effectively implementing pp_state_fun ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants