| Anonymous | Login | Signup for a new account | 2013-05-21 10:43 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0000112 | OCaml | OCaml general | public | 2000-05-15 17:06 | 2000-05-16 10:41 | |||
| Reporter | administrator | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0000112: Bug in O'Caml 3.00 | |||||||
| 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 | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0000389) administrator (administrator) 2000-05-15 17:57 |
> 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. Thanks for the nicely delineated bug report. Best regards, - Xavier Leroy |
|
(0000390) administrator (administrator) 2000-05-16 10:41 |
Fixed on 2000-05-16 by Xavier (missing alpha-conversion in Subst.modtype and Subst.signature). |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| Copyright © 2000 - 2011 MantisBT Group |