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: 112 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello, Xavier!
When I try to compile by Ocaml-3.00 under RH Linux 6.2 on x86
the following program:
--------CUT-------
type data = int
type key = string
type no = int
type elt = {no: int}
module Nset = Set.Make (struct type t = elt let compare = compare end)
let remove by_no elt = Nset.remove elt by_no
--------CUT-------
compiler crashed with the following message:
Uncaught exception: Stack overflow
When I change `elt' to the any other identifier all works.
Also this sample compiled well when I remove 3 first type
declarations.
Regargs,
Anton Moscal
The text was updated successfully, but these errors were encountered:
When I try to compile by Ocaml-3.00 under RH Linux 6.2 on x86
the following program:
compiler crashed with the following message:
Uncaught exception: Stack overflow
When I change `elt' to the any other identifier all works.
Also this sample compiled well when I remove 3 first type
declarations.
You've found a long-standing bug in the OCaml type-checker. The bug
is due to a bad handling of name clashes in type substitution.
Your example exposes this bug because you're defining a type named
"elt" as 4th definition of your module, while the result signature for
Set.Make also contains a type named "elt" as 4th definition of the
module "Set", hence the name clash.
I expect to be able to fix this bug in the next few days.
Original bug ID: 112
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello, Xavier!
When I try to compile by Ocaml-3.00 under RH Linux 6.2 on x86
the following program:
--------CUT-------
type data = int
type key = string
type no = int
type elt = {no: int}
module Nset = Set.Make (struct type t = elt let compare = compare end)
let remove by_no elt = Nset.remove elt by_no
--------CUT-------
compiler crashed with the following message:
Uncaught exception: Stack overflow
When I change `elt' to the any other identifier all works.
Also this sample compiled well when I remove 3 first type
declarations.
Regargs,
Anton Moscal
The text was updated successfully, but these errors were encountered: