Permalink
Browse files

fix and testing

  • Loading branch information...
1 parent 41dc73d commit 6e907608c23d78f7a32d5a838f5b3c548c659236 @camlspotter camlspotter committed Feb 14, 2013
Showing with 11 additions and 22 deletions.
  1. +2 −2 OMakefile
  2. +2 −16 README.mkdn
  3. +1 −1 modules-init.sh
  4. +6 −3 search.ml
View
@@ -72,8 +72,8 @@ OUNIT_LIBS[] =
base
hList
-OUnitTest(config, config)
-OUnitTest(search, search config searchid list2)
+OUnitTest(config, chconfig)
+OUnitTest(search, search chconfig searchid list2)
OUnitTest(controller, controller)
########################################################################
View
@@ -13,34 +13,20 @@ It is similar to Hoogle, which is a Haskell API search engine.
PREREQUISITES
-------------
-* ocaml 3.12.0
+* ocaml 4.00.1
* omake
* findlib
* extlib
* oUnit(for unit test)
+* CamlGI
INSTALL
-------
-### 1. Download OCaml compiler version 3.12.0. ###
-
-* Do no ask me where to find it.
-* You can also use the CVS version
-
-### 2. Extract the compiler source. ###
-
-* tar zxvf ocaml-3.12.0.tar.gz
-* cd ocaml-3.12.0
-
### 3. Download OCaml API search ###
* git clone git://github.com/mzp/ocaml-hoogle.git
-### 4. Build a bytecode compiler ###
-
-* ./configure
-* make core
-
### 5. Build OCaml API Search ###
* cd ocaml-hoogle
View
@@ -2,7 +2,7 @@
cat <<EOF > modules.txt
- stdlib
-PATH:: `ocamlfind query threads.posix`
+PATH:: `ocamlfind query unix`
Pervasives
Arg
Array
View
@@ -27,12 +27,14 @@ module Toploop = struct
may have added to load_path. *)
load_path := !load_path @ [Filename.concat Config.standard_library "camlp4"];
load_path := "" :: (List.rev !Clflags.include_dirs @ !load_path);
- Dll.add_path !load_path
+ Dll.add_path !load_path;
+List.iter (fun p -> prerr_endline ("XXX Toploop " ^ p)) !load_path
end
module Topdirs = struct
open Misc
let dir_directory s =
+prerr_endline ("XXX Topdirs " ^ s);
let d = expand_directory Config.standard_library s in
Config.load_path := d :: !Config.load_path;
Dll.add_path [d]
@@ -42,7 +44,8 @@ let init modules paths =
(* initialize *)
Toploop.set_paths ();
List.iter ~f:Topdirs.dir_directory paths;
- Searchid.module_list := modules @ init_modules
+ Searchid.module_list := modules @ init_modules;
+List.iter (fun x -> prerr_endline ("XXX module " ^ x)) !Searchid.module_list
let sure f x =
try
@@ -154,7 +157,7 @@ let lift f s =
+> List.map ~f:to_result
let search s modules paths =
- init modules paths;
+ init modules paths; (* CR jfuruse: multiple calls of [search] accumulates load paths and others *)
List.rev @@
ExtList.List.unique @@
List.rev @@

0 comments on commit 6e90760

Please sign in to comment.