Better backtraces for lazy values

master
Leo White 2020-04-18 16:21:17 +01:00
parent 9895b28d25
commit a02707c610
2 changed files with 2 additions and 1 deletions

View File

@ -679,7 +679,7 @@ let lambda_of_prim prim_name prim loc args arg_exps =
loc),
Lprim(Praise Raise_reraise, [raise_arg], loc)))
| Lazy_force, [arg] ->
Matching.inline_lazy_force arg Loc_unknown
Matching.inline_lazy_force arg loc
| Loc kind, [] ->
lambda_of_loc kind loc
| Loc kind, [arg] ->

View File

@ -2,6 +2,7 @@ Uncaught exception Not_found
Raised at Lazy.l1 in file "lazy.ml", line 8, characters 28-45
Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 31, characters 17-27
Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 36, characters 4-11
Called from Lazy.test1 in file "lazy.ml", line 11, characters 11-24
Called from Lazy.run in file "lazy.ml", line 20, characters 4-11
Uncaught exception Not_found
Raised at Lazy.l2 in file "lazy.ml", line 13, characters 28-45