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: 1355 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Original bug ID: 1355
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Jean-Marc Eber
Version: 3.06
OS: linux,win32
Submission from: parwch03-up1.sgib.com (207.45.248.21)
Hi all,
Some(-2);;
Some -2;;
The constructor Some expects 1 argument(s)...
Too bad:
the value printed by the toplevel "Some -2" isn't a correct ocaml expression.
Easy fix (may be there is a more elegant?):
In /typing/oprint.ml,
add the lines marked (+)
let print_out_value ppf tree =
let rec print_tree_1 ppf =
function
fprintf ppf "@[<1>%a@ %a@]" print_ident name print_simple_tree param
| Oval_constr (name, (_ :: _ as params)) ->
fprintf ppf "@[<1>%a@ (%a)@]" print_ident name
(print_tree_list print_tree_1 ",") params
| Oval_variant (name, Some param) ->
fprintf ppf "@[<2>`%s@ %a@]" name print_simple_tree param
| tree -> print_simple_tree ppf tree
and print_simple_tree ppf =
Jean-Marc Eber
The text was updated successfully, but these errors were encountered: