Project

General

Profile

Revision e7cc5186 src/compiler_common.ml

View differences:

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

  
24 24
let create_dest_dir () =
......
55 55
      raise exc
56 56
    | Corelang.Error (loc, err) as exc -> (
57 57
      eprintf "Parsing error: %a%a@."
58
	Corelang.pp_error err
58
	Error.pp_error_msg err
59 59
	Location.pp_loc loc;
60 60
      raise exc
61 61
    )
......
81 81
    raise exc
82 82
  | Corelang.Error (loc, err) as exc ->
83 83
    eprintf "Parsing error: %a%a@."
84
      Corelang.pp_error err
84
      Error.pp_error_msg err
85 85
      Location.pp_loc loc;
86 86
    raise exc
87 87

  
......
91 91
    Automata.expand_decls decls
92 92
  with (Corelang.Error (loc, err)) as exc ->
93 93
    eprintf "Automata error: %a%a@."
94
      Corelang.pp_error err
94
      Error.pp_error_msg err
95 95
      Location.pp_loc loc;
96 96
    raise exc
97 97

  
......
128 128
	raise exc
129 129
    end 
130 130
  in
131
  if !Options.print_types then
131
  if !Options.print_types || !Options.verbose_level > 2 then
132 132
    Log.report ~level:1 (fun fmt -> fprintf fmt "@[<v 2>  %a@]@ " Corelang.pp_prog_type decls);
133 133
  new_env
134 134
      
......
143 143
	raise exc
144 144
    end
145 145
  in
146
  if !Options.print_clocks then
146
  if !Options.print_clocks  || !Options.verbose_level > 2 then
147 147
    Log.report ~level:1 (fun fmt -> fprintf fmt "@[<v 2>  %a@]@ " Corelang.pp_prog_clock decls);
148 148
  new_env
149 149

  
......
233 233

  
234 234

  
235 235
let import_dependencies prog =
236
  Log.report ~level:1 (fun fmt -> fprintf fmt "@[<v 0>.. extracting dependencies@ ");
236
  Log.report ~level:1 (fun fmt -> fprintf fmt "@[<v 4>.. extracting dependencies");
237 237
  let dependencies = Corelang.get_dependencies prog in
238 238
  let deps =
239 239
  List.fold_left
240 240
    (fun (compilation_dep, type_env, clock_env) dep ->
241 241
      let (local, s) = Corelang.dependency_of_top dep in
242 242
      let basename = Options_management.name_dependency (local, s) in
243
      Log.report ~level:1 (fun fmt -> Format.fprintf fmt "  Library %s@ " basename);
243
      Log.report ~level:1 (fun fmt -> Format.fprintf fmt "@ Library %s" basename);
244 244
      let lusic = Modules.import_dependency dep.top_decl_loc (local, s) in
245 245
      (*Log.report ~level:1 (fun fmt -> Format.fprintf fmt "");*)
246 246
      let (lusi_type_env, lusi_clock_env) = get_envs_from_top_decls lusic.Lusic.contents in

Also available in: Unified diff