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: 1535 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
It appears that only the first of a set of simultaneously-defined recursive
definitions is "#trace"able. This is counter-intuitive.
Original bug ID: 1535
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
It appears that only the first of a set of simultaneously-defined recursive
definitions is "#trace"able. This is counter-intuitive.
Chris Dutchyn
cdutchyn@cs.ubc.ca
(* Test Cases )
( (1) demonstrates the problem *)
let rec even x = if 0=x then true else odd (x-1)
and odd x = if 0=x then false else even (x-1);;
val even : int -> bool =
val odd : int -> bool =
#trace even;;
even is now traced.
#trace odd;;
odd is not a function.
even;;
-: int -> bool =
odd;;
(* (2) it is the rec that causes the failure *)
let rec foo x = x+1
and bar x = x+1;;
val foo : int -> int =
val bar : int -> int =
#trace bar;;
bar is not a function.
(* (3) without rec works *)
let foo1 x = x+2
and bar1 x = x-2;;
#trace bar1;;
bar1 is now traced.
(* end test cases *)
The text was updated successfully, but these errors were encountered: