summaryrefslogtreecommitdiff
path: root/debugger/printval.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1997-02-25 14:40:10 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1997-02-25 14:40:10 +0000
commit6288fc71e090ae018a50ba3db9e1c6e8e0ef88c3 (patch)
tree43f5e76d4025609c1802a3c9d31c223e27ffcfa2 /debugger/printval.ml
parent3eb0c4bea29bda882e002c4ebf825c66599b9ed6 (diff)
downloadocaml-6288fc71e090ae018a50ba3db9e1c6e8e0ef88c3.tar.gz
Corrections diverses
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1299 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'debugger/printval.ml')
-rw-r--r--debugger/printval.ml24
1 files changed, 11 insertions, 13 deletions
diff --git a/debugger/printval.ml b/debugger/printval.ml
index 17d5d9d426..cc360f933e 100644
--- a/debugger/printval.ml
+++ b/debugger/printval.ml
@@ -17,7 +17,7 @@
open Misc
open Obj
open Format
-open Longident
+open Parser_aux
open Path
open Types
@@ -298,19 +298,17 @@ let print_value max_depth obj ty env =
in print_val 0 max_depth obj ty
-let print_named_value max_depth obj ty env =
+let print_named_value max_depth exp obj ty env =
open_hovbox 2;
- let n = name_value obj ty in
- print_char '$'; print_int n;
- print_string " :"; print_space(); Printtyp.type_expr ty;
- print_space(); print_string "="; print_space();
- print_value max_depth obj ty env;
- close_box();
- print_newline()
-
-let print_ident_value max_depth lid obj ty env =
- open_hovbox 2;
- Printtyp.longident lid;
+ begin match exp with
+ E_ident lid ->
+ Printtyp.longident lid
+ | E_name n ->
+ print_char '$'; print_int n
+ | _ ->
+ let n = name_value obj ty in
+ print_char '$'; print_int n
+ end;
print_string " :"; print_space(); Printtyp.type_expr ty;
print_space(); print_string "="; print_space();
print_value max_depth obj ty env;