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: 3898 Reporter: philippe_wang Status: closed (set by @damiendoligez on 2005-12-01T09:23:12Z) Resolution: not a bug Priority: normal Severity: minor Version: 3.09.0 Category: ~DO NOT USE (was: OCaml general)
Bug description
the ocaml binary program accepts and executes without any warning or error this :
let ($),(/),(^),c = Thread.create,print_string,(fun _->flush stdout), ref 0
but ocamlopt and ocamlc refuse to compile it because of type variables that cannot be generalized.
Additional information
A file starting with this line :
let ($),(/),(^),c = Thread.create,print_string,(fun _->flush stdout), ref 0
returns :
shell_prompt> ocamlc -thread unix.cma threads.cma foo.ml
File "foo.ml", line 1, characters 20-75:
The type of this expression,
((unit -> '_a) -> unit -> Thread.t) * (string -> unit) * (unit -> unit) *
int ref, contains type variables that cannot be generalized
With the interactive mode :
shell_prompt> ocaml -I +threads unix.cma threads.cma
Objective Caml version 3.09.0
let ($),(/),(^),c = Thread.create,print_string,(fun _->flush stdout), ref 0 ;;
val ( $ ) : ('_a -> '_b) -> '_a -> Thread.t =
val ( / ) : string -> unit =
val ( ^ ) : '_a -> unit =
val c : int ref = {contents = 0}
The text was updated successfully, but these errors were encountered:
Original bug ID: 3898
Reporter: philippe_wang
Status: closed (set by @damiendoligez on 2005-12-01T09:23:12Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 3.09.0
Category: ~DO NOT USE (was: OCaml general)
Bug description
the ocaml binary program accepts and executes without any warning or error this :
let ($),(/),(^),c = Thread.create,print_string,(fun _->flush stdout), ref 0
but ocamlopt and ocamlc refuse to compile it because of type variables that cannot be generalized.
Additional information
A file starting with this line :
let ($),(/),(^),c = Thread.create,print_string,(fun _->flush stdout), ref 0
returns :
shell_prompt> ocamlc -thread unix.cma threads.cma foo.ml
File "foo.ml", line 1, characters 20-75:
The type of this expression,
((unit -> '_a) -> unit -> Thread.t) * (string -> unit) * (unit -> unit) *
int ref, contains type variables that cannot be generalized
With the interactive mode :
shell_prompt> ocaml -I +threads unix.cma threads.cma
Objective Caml version 3.09.0
let ($),(/),(^),c = Thread.create,print_string,(fun _->flush stdout), ref 0 ;;
val ( $ ) : ('_a -> '_b) -> '_a -> Thread.t =
val ( / ) : string -> unit =
val ( ^ ) : '_a -> unit =
val c : int ref = {contents = 0}
The text was updated successfully, but these errors were encountered: