Project

General

Profile

Revision 04a188ec src/compiler_common.ml

View differences:

src/compiler_common.ml
18 18
  if !Options.main_node = "" then
19 19
    begin
20 20
      eprintf "Code generation error: %a@." Error.pp_error_msg Error.No_main_specified;
21
      raise (Error (Location.dummy_loc, Error.No_main_specified))
21
      raise (Error.Error (Location.dummy_loc, Error.No_main_specified))
22 22
    end
23 23

  
24 24
let create_dest_dir () =
......
59 59
    | (Parse.Error err) as exc -> 
60 60
       Parse.report_error err;
61 61
       raise exc
62
    | Corelang.Error (loc, err) as exc -> (
62
    | Error.Error (loc, err) as exc -> (
63 63
      eprintf "Parsing error: %a%a@."
64 64
        Error.pp_error_msg err
65 65
        Location.pp_loc loc;
......
74 74
  Log.report ~level:1 (fun fmt -> fprintf fmt ".. expanding automata@ ");
75 75
  try
76 76
    Automata.expand_decls decls
77
  with (Corelang.Error (loc, err)) as exc ->
77
  with (Error.Error (loc, err)) as exc ->
78 78
    eprintf "Automata error: %a%a@."
79 79
      Error.pp_error_msg err
80 80
      Location.pp_loc loc;
......
237 237
            let stmts = in_assigns :: out_assigns :: imp_nd.node_stmts @ stmts in
238 238
            let c = merge_contracts c imp_c in
239 239
            stmts, locals, c 
240
          with Not_found -> Format.eprintf "Where is contract %s@.@?" name; raise (Error (loc, (Error.Unbound_symbol ("contract " ^ name))))
240
          with Not_found -> Format.eprintf "Where is contract %s@.@?" name; raise (Error.Error (loc, (Error.Unbound_symbol ("contract " ^ name))))
241 241

  
242 242
         
243 243
        ) ([], c.consts@c.locals, c) c.imports

Also available in: Unified diff