Commits

Anonymous committed 09cb0e7

added test

Comments (0)

Files changed (4)

ocamlspot/ocamlspot.ml

 
       (* CR jfuruse: searching algorithm must be reconsidered *)        
       let load_module ~load_paths name =
+	let spotname = name ^ ".spot" in
         try
-	  let spotname = name ^ ".spot" in
           load ~load_paths spotname
 	with
 	| Failure s ->
-	    let spotname = name ^ ".spit" in
+	    let spitname = name ^ ".spit" in
+            Format.eprintf "%s load failed. Try to load %s@."
+              spotname spitname;
             try
-	      load ~load_paths spotname
+	      load ~load_paths spitname
 	    with
 	    | Failure s' ->
 		(* CR jfuruse: ugly! *)

ocamlspot/tests/Makefile.targets

 type_def.cmo \
 types_in_type_def.cmo \
 variant.cmo \
+variant_external.cmo \

ocamlspot/tests/variant_external.ml

+open Variant
+
+let _ = M.Foo (* ? M.t *) 1
+
+let _ = if true then (M.Foo 1, []) else assert false
+
+
     | Some (Node (elem', t')) ->
 	find_path_contains_aux ((elem', t') :: path) node t' 
 
-  let find_path_contains elem t = 
+  let (* find_path_contains => *) find_path_contains (* <= find_path_contains *) elem t = 
     find_path_contains_aux [] (Node (elem, empty)) t
 
   let rec iter_elem ~parent f =