summaryrefslogtreecommitdiff
path: root/checker
diff options
context:
space:
mode:
authorGravatar Stephane Glondu <steph@glondu.net>2013-05-08 17:47:10 +0200
committerGravatar Stephane Glondu <steph@glondu.net>2013-05-08 17:47:10 +0200
commit499a11a45b5711d4eaabe84a80f0ad3ae539d500 (patch)
tree09dafc3e5c7361d3a28e93677eadd2b7237d4f9f /checker
parentbf12eb93f3f6a6a824a10878878fadd59745aae0 (diff)
Imported Upstream version 8.4pl2dfsgupstream/8.4pl2dfsg
Diffstat (limited to 'checker')
-rw-r--r--checker/check.ml6
-rw-r--r--checker/checker.ml3
-rw-r--r--checker/mod_checking.ml7
3 files changed, 11 insertions, 5 deletions
diff --git a/checker/check.ml b/checker/check.ml
index 237eb079..fb0dc12a 100644
--- a/checker/check.ml
+++ b/checker/check.ml
@@ -290,9 +290,9 @@ let intern_from_file (dir, f) =
let (md,table,digest) =
try
let ch = with_magic_number_check raw_intern_library f in
- let (md:library_disk) = System.marshal_in ch in
- let digest = System.marshal_in ch in
- let table = (System.marshal_in ch : Safe_typing.LightenLibrary.table) in
+ let (md:library_disk) = System.marshal_in f ch in
+ let digest = System.marshal_in f ch in
+ let table = (System.marshal_in f ch : Safe_typing.LightenLibrary.table) in
close_in ch;
if dir <> md.md_name then
errorlabstrm "load_physical_library"
diff --git a/checker/checker.ml b/checker/checker.ml
index 945abde4..e5e20b1a 100644
--- a/checker/checker.ml
+++ b/checker/checker.ml
@@ -371,7 +371,8 @@ let run () =
compile_files ();
flush_all()
with e ->
- (Pp.ppnl(explain_exn e);
+ (flush_all();
+ Pp.ppnl(explain_exn e);
flush_all();
exit 1)
diff --git a/checker/mod_checking.ml b/checker/mod_checking.ml
index e3431fec..dc3ed452 100644
--- a/checker/mod_checking.ml
+++ b/checker/mod_checking.ml
@@ -133,6 +133,11 @@ let lookup_modtype mp env =
with Not_found ->
failwith ("Unknown module type: "^string_of_mp mp)
+let lookup_module mp env =
+ try Environ.lookup_module mp env
+ with Not_found ->
+ failwith ("Unknown module: "^string_of_mp mp)
+
let rec check_with env mtb with_decl mp=
match with_decl with
| With_definition_body (idl,c) ->
@@ -199,7 +204,7 @@ and check_with_mod env mtb (idl,mp1) mp =
SFBmodule msb -> msb
| _ -> error_not_a_module l
in
- let (_:module_body) = (lookup_module mp1 env) in ()
+ let (_:module_body) = (Environ.lookup_module mp1 env) in ()
else
let old = match spec with
SFBmodule msb -> msb