Commits

Anonymous committed 65958db

about Cd_List.{dump,ti_dump}

  • Participants
  • Parent commits 8d92fc4

Comments (0)

Files changed (2)

File src/cd_Array.ml

             (match show with
              [ None ->
                  fun arr ->
-                   Cd_List.List.dump
+                   Cd_List.List.ti_dump
                      ~begins:"[|" ~ends:"|]" ~delim:"; "
                      ti_elem
                      (Array.to_list arr)

File src/cd_List.ml

 
     value fmap = map;
 
-    value dump ?(begins="[") ?(ends="]") ?(delim="; ") (t : #Cdt.ti _) lst =
+    value dump ?(begins="[") ?(ends="]") ?(delim="; ") dump_item lst =
       let open Buffer in
       let b = create 30 in
       ( add_string b begins
-      ; let show = Cdt.get_meth_typed1 "show" t t Cdt.ti_string in
-        let add x = add_string b (show x) in
+      ; 
+        let add x = add_string b (dump_item x) in
         match lst with
         [ [] -> ()
         | [h :: t] ->
       )
     ;
 
+    value ti_dump ?(begins="[") ?(ends="]") ?(delim="; ") (t : #Cdt.ti _) lst =
+      let show = Cdt.get_meth_typed1 "show" t t Cdt.ti_string in
+      dump ~begins ~ends ~delim show lst
+    ;
+
 
 (*
     type list_for_ti 'a =
             (match show with
              [ None ->
                  fun lst ->
-                   dump
+                   ti_dump
                      ~begins:"[" ~ends:"]" ~delim:"; "
                      ti_elem
                      lst