| Anonymous | Login | Signup for a new account | 2013-05-21 09:33 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 | |||
| 0000138 | OCaml | OCaml general | public | 2000-06-12 08:44 | 2000-06-12 09:09 | |||
| 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 | 0000138: Assertion failure in printtyp.ml | |||||||
| Description | Full_Name: Version: Objective Caml 3.00 OS: Submission from: orion.kurims.kyoto-u.ac.jp (130.54.16.5) Submitted by: garrigue ~# ocaml Objective Caml version 3.00 # type t = string option;; type t = string option # let (f : t -> string) = function None -> "" | Some v -> v;; val f : t -> string = <fun> # let g ?opt () = f opt;; val g : ?opt:Uncaught exception: File "typing/printtyp.ml", line 0, characters 6494-6506: Assertion failed The same message was printed when trying to compile the code. Perhaps a better error message could be used? | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0000406) administrator (administrator) 2000-06-12 09:04 |
> # type t = string option;; > type t = string option > # let (f : t -> string) = function > None -> "" > | Some v -> v;; > val f : t -> string = <fun> > # let g ?opt () = f opt;; > val g : ?opt:Uncaught exception: File "typing/printtyp.ml", line 0, characters > 6494-6506: Assertion failed > > The same message was printed when trying to compile the code. > Perhaps a better error message could be used? Indeed. Due to the structure of the compiler, it would difficult to get the correct type printed, but I changed it so as to have partial type information (and no error). # let g ?opt () = f opt;; val g : ?opt:<hiddent> -> unit -> string The only way to have the system print the correct type is to write a module signature... (A type constraint would not do, since it propagates abbreviation.) Jacques Garrigue |
|
(0000407) administrator (administrator) 2000-06-12 09:09 |
Partially fixed by Jacques on 2000-06-12. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| Copyright © 2000 - 2011 MantisBT Group |