Project

General

Profile

Revision 01d48bb0 src/modules.ml

View differences:

src/modules.ml
117 117
  ((if local then !Options.dest_dir else Version.include_path) ^ "/") ^ dep
118 118

  
119 119
let import_dependency loc (local, dep) =
120
  let basename = name_dependency (local, dep) in
121
  let extension = ".lusic" in 
122 120
  try
123
    Lusic.read_lusic basename extension
124
  with Sys_error msg ->
125
    begin
121
    let basename = name_dependency (local, dep) in
122
    let extension = ".lusic" in 
123
    try
124
      let lusic = Lusic.read_lusic basename extension in
125
      Lusic.check_obsolete lusic basename;
126
      lusic
127
    with Sys_error msg ->
128
      begin
126 129
      (*Format.eprintf "Error: %s@." msg;*)
127
      raise (Error (loc, Unknown_library basename))
128
    end
130
	raise (Error (loc, Unknown_library basename))
131
      end
132
  with
133
  | Corelang.Error (loc, err) as exc -> (
134
    Format.eprintf "Library error: %a%a@."
135
      Corelang.pp_error err
136
      Location.pp_loc loc;
137
    raise exc
138
  )
129 139

  
130 140
let rec load_header_rec imported header =
131 141
  List.fold_left (fun imp decl ->

Also available in: Unified diff