- let path = MatitaMisc.obj_file_of_script path in
- (try
- let ic = try_open_in ~f:open_in opts.include_paths path in
- let stream = Stream.of_channel ic in
- let status = ref status in
- !eval_from_stream_ref status stream (fun _ _ -> ());
- close_in ic;
- !status
- with Sys_error _ -> raise (UnableToInclude path))
+ let absolute_path = make_absolute opts.include_paths path in
+ let moopath = MatitaMisc.obj_file_of_script absolute_path in
+ let ic =
+ try open_in moopath with Sys_error _ ->
+ raise (IncludedFileNotCompiled moopath) in
+ let stream = Stream.of_channel ic in
+ let status = ref status in
+ !eval_from_stream_ref status stream (fun _ _ -> ());
+ close_in ic;
+ !status