-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Printing of the value of optional arguments in #trace #6610
Copy link
Copy link
Closed
Description
Original bug ID: 6610
Reporter: herbelin
Status: closed (set by @damiendoligez on 2016-04-12T13:09:34Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 4.01.0
Target version: 4.03.0+dev / +beta1
Category: tools (ocaml{lex,yacc,dep,debug,...})
Related to: #5975
Monitored by: @gasche
Bug description
Hi,
I'm not sure this is a bug or an intended feature. In the trace mechanism, optional arguments with a default value are printed using their internal representation in the option type rather than using their usage type, as in:
let f ?(a=true) x = if a then x else x;;
#trace f;;
f 1;;
(*
f <-- ?a:None
f -->
f* <--
f* -->
*)
Steps to reproduce
let f ?(a=true) x = if a then x else x;;
#trace f;;
f 1;;
Reactions are currently unavailable