You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6785 Reporter:@zoggy Status: closed (set by @zoggy on 2015-02-18T07:06:53Z) Resolution: not a bug Priority: normal Severity: minor Category: typing Monitored by:@whitequark@hcarty
Bug description
Hello,
Using some ppx extension and "module type of" construct, I end up with:
The value `()' is required but not provided
To try it, I attach files m.ml and m.mli. To compile, you need ppx_deriving_yojson.
$ ocamlfind ocamlc -c -package ppx_deriving_yojson m.mli
$ ocamlfind ocamlc -c -package ppx_deriving_yojson m.ml
File "m.ml", line 1:
Error: The implementation m.ml does not match the interface m.cmi:
...
At position module type P =
The value `()' is required but not provided
File "m.ml", line 9, characters 4-61: Expected declaration
Note that if there is no .mli, compiling m.ml does not raise any problem.
What you ask for doesn't make sense. The module type of [struct let () = .. let _ = .. end] is [sig end], there is nothing to filter out.
Maybe the ppx rewriter is creating identifiers called "()" or "_" instead of proper patterns.
Indeed, this was the case. I used a variable called "()" (or "_") rather than the constructor "()" (or the any pattern).
Regarding the error message, I thought that something was missing in the .ml file wrt to the mli file, but it was the contrary.
Original bug ID: 6785
Reporter: @zoggy
Status: closed (set by @zoggy on 2015-02-18T07:06:53Z)
Resolution: not a bug
Priority: normal
Severity: minor
Category: typing
Monitored by: @whitequark @hcarty
Bug description
Hello,
Using some ppx extension and "module type of" construct, I end up with:
To try it, I attach files m.ml and m.mli. To compile, you need ppx_deriving_yojson.
$ ocamlfind ocamlc -c -package ppx_deriving_yojson m.mli
$ ocamlfind ocamlc -c -package ppx_deriving_yojson m.ml
File "m.ml", line 1:
Error: The implementation m.ml does not match the interface m.cmi:
...
At position module type P =
The value `()' is required but not provided
File "m.ml", line 9, characters 4-61: Expected declaration
Note that if there is no .mli, compiling m.ml does not raise any problem.
File attachments
The text was updated successfully, but these errors were encountered: