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

show not working for certain types #261

Closed
apuccia opened this issue Apr 29, 2022 · 1 comment
Closed

show not working for certain types #261

apuccia opened this issue Apr 29, 2022 · 1 comment

Comments

@apuccia
Copy link

apuccia commented Apr 29, 2022

I'm doing a school project in which I have some types annotated with show and other plugins, as an example:

and 'a lvalue_node =
  | AccVar of identifier option * identifier 
  | AccIndex of 'a lvalue * 'a expr (* here also expr derives show, ord, eq *) 
[@@deriving show, ord, eq]

Now, I'm trying to use the corresponding show function but I get the following error:

Error: This expression has type 'a lvalue_node
       but an expression was expected of type Format.formatter -> 'b -> unit
@apuccia
Copy link
Author

apuccia commented Apr 30, 2022

I solved the problem. Simply I had to pass to show_lvalue_node also the pp_* function of the type parameter used.

@apuccia apuccia closed this as completed Apr 30, 2022
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

1 participant