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: 4354 Reporter: dbrumley Assigned to:@damiendoligez Status: closed (set by @damiendoligez on 2007-11-26T16:15:06Z) Resolution: fixed Priority: normal Severity: major Version: 3.10.0 Fixed in version: 3.10+dev Category: ~DO NOT USE (was: OCaml general) Monitored by: aij dbrumley jcristau
Bug description
ocamlcp does not seem to resolve type variables the same as ocamlc.
e.g., in the attached code we get the error with ocamlcp -p a:
Values do not match:
val dprintf : ('_a, unit, string, unit) format4 -> '_a
is not included in
val dprintf : ('a, unit, string, unit) format4 -> 'a
but it compiles fine with ocamlc.
Additional information
I ran the following:
$ ocamlc -p a -c debug.mli
$ ocamlc -p a -c debug.ml
File "/tmp/camlppfe086a", line 208, characters 0-1736:
Signature mismatch:
Modules do not match:
sig
val debug : bool
val pdebug : string -> unit
val pdebug : string -> unit
val dprintf : ('a, unit, string, unit) format4 -> 'a
val dprintf : ('_a, unit, string, unit) format4 -> '_a
val dtrace :
before:('a -> unit) -> f:('a -> 'b) -> after:('b -> unit) -> 'a -> 'b
val dtrace :
before:('_a -> unit) ->
f:('_a -> '_b) -> after:('_b -> unit) -> '_a -> '_b
val warn : bool
val pwarn : string -> unit
val pwarn : string -> unit
val wprintf : ('a, unit, string, unit) format4 -> 'a
val wprintf : ('_a, unit, string, unit) format4 -> '_a
end
is not included in
DEBUG
Values do not match:
val dprintf : ('_a, unit, string, unit) format4 -> '_a
is not included in
val dprintf : ('a, unit, string, unit) format4 -> 'a
However, ocamlc compiles fine:
$ ocamlc -c debug.mli
$ ocamlc -c debug.ml
$
I tried this with both ocaml 3.10.0 compiled from source, and ocaml-3.09.2 from the dpkg in the ubuntu distribution.
It's not obvious whether we can fix this. In the meantime,
the workaround is to eta-expand your dprintf function (which
you presumably don't want to do, for efficiency reasons), or
to avoid compiling debug.ml in profile mode (which does not
prevent you from profiling the rest of your program).
Original bug ID: 4354
Reporter: dbrumley
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2007-11-26T16:15:06Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.10.0
Fixed in version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: aij dbrumley jcristau
Bug description
ocamlcp does not seem to resolve type variables the same as ocamlc.
e.g., in the attached code we get the error with ocamlcp -p a:
but it compiles fine with ocamlc.
Additional information
I ran the following:
However, ocamlc compiles fine:
I tried this with both ocaml 3.10.0 compiled from source, and ocaml-3.09.2 from the dpkg in the ubuntu distribution.
File attachments
The text was updated successfully, but these errors were encountered: