summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>2011-03-08 08:55:18 +0000
committerFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>2011-03-08 08:55:18 +0000
commit5d5614340d7349e1a9197c2b0d4f2d5538d8f506 (patch)
tree41204b83177c045429d6b58054d1d06a6ee3a23b
parent862cc76b9370bf5c4b07cc3c4020fc367a1b397b (diff)
downloadocaml-namespaces.tar.gz
namespaces: fixed camlp4 compilation, but ocamlbuild still fails to compile, no clue whynamespaces
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/namespaces@10978 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--ocaml-namespaces/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml6
-rw-r--r--ocaml-namespaces/ocamldoc/odoc_analyse.ml2
-rw-r--r--ocaml-namespaces/ocamldoc/odoc_ast.ml4
3 files changed, 7 insertions, 5 deletions
diff --git a/ocaml-namespaces/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml b/ocaml-namespaces/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml
index 9146fa25d0..ec3daae6e0 100644
--- a/ocaml-namespaces/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml
+++ b/ocaml-namespaces/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml
@@ -775,7 +775,7 @@ module Make (Ast : Sig.Camlp4Ast) = struct
let e2 = ExSeq loc el in
mkexp loc (Pexp_while (expr e1) (expr e2))
| <:expr@loc< let open $i$ in $e$ >> ->
- mkexp loc (Pexp_open (long_uident i) (expr e))
+ mkexp loc (Pexp_open (long_uident i) None (expr e))
| <:expr@loc< (module $me$ : $pt$) >> ->
mkexp loc (Pexp_constraint (mkexp loc (Pexp_pack (module_expr me)),
Some (mktyp loc (Ptyp_package (package_type pt))), None))
@@ -889,7 +889,7 @@ module Make (Ast : Sig.Camlp4Ast) = struct
in
[mksig loc (Psig_modtype n si) :: l]
| SgOpn loc id ->
- [mksig loc (Psig_open (long_uident id)) :: l]
+ [mksig loc (Psig_open (long_uident id) None) :: l]
| SgTyp loc tdl -> [mksig loc (Psig_type (mktype_decl tdl [])) :: l]
| SgVal loc n t -> [mksig loc (Psig_value n (mkvalue_desc t [])) :: l]
| <:sig_item@loc< $anti:_$ >> -> error loc "antiquotation in sig_item" ]
@@ -954,7 +954,7 @@ module Make (Ast : Sig.Camlp4Ast) = struct
[mkstr loc (Pstr_recmodule (module_str_binding mb [])) :: l]
| StMty loc n mt -> [mkstr loc (Pstr_modtype n (module_type mt)) :: l]
| StOpn loc id ->
- [mkstr loc (Pstr_open (long_uident id)) :: l]
+ [mkstr loc (Pstr_open (long_uident id) None) :: l]
| StTyp loc tdl -> [mkstr loc (Pstr_type (mktype_decl tdl [])) :: l]
| StVal loc rf bi ->
[mkstr loc (Pstr_value (mkrf rf) (binding bi [])) :: l]
diff --git a/ocaml-namespaces/ocamldoc/odoc_analyse.ml b/ocaml-namespaces/ocamldoc/odoc_analyse.ml
index 2091dd3967..5987152252 100644
--- a/ocaml-namespaces/ocamldoc/odoc_analyse.ml
+++ b/ocaml-namespaces/ocamldoc/odoc_analyse.ml
@@ -139,7 +139,7 @@ let process_interface_file ppf sourcefile =
Env.set_unit_name modulename;
let inputfile = preprocess sourcefile in
let ast = parse_file inputfile Parse.interface ast_intf_magic_number in
- let sg = Typemod.transl_signature (initial_env()) ast in
+ let sg = Typemod.transl_interface inputfile (initial_env()) ast in
Warnings.check_fatal ();
(ast, sg, inputfile)
diff --git a/ocaml-namespaces/ocamldoc/odoc_ast.ml b/ocaml-namespaces/ocamldoc/odoc_ast.ml
index c497794184..25f68ce394 100644
--- a/ocaml-namespaces/ocamldoc/odoc_ast.ml
+++ b/ocaml-namespaces/ocamldoc/odoc_ast.ml
@@ -1381,7 +1381,9 @@ module Analyser =
in
(0, new_env2, [ Element_module_type mt ])
- | Parsetree.Pstr_open longident ->
+ | Parsetree.Pstr_open (longident,Some _) -> assert false (* TODO *)
+
+ | Parsetree.Pstr_open (longident,None) ->
(* A VOIR : enrichir l'environnement quand open ? *)
let ele_comments = match comment_opt with
None -> []