Skip to content

Printing of the value of optional arguments in #trace #6610

@vicuna

Description

@vicuna

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;;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions