Project

General

Profile

Revision 49d364b8

View differences:

src/compiler_stages.ml
67 67

  
68 68
  (* Importing source *)
69 69
  let prog, dependencies, (typ_env, clk_env) = Modules.load ~is_header:(extension = ".lusi") prog in
70

  
71 70
  (* Registering types and clocks for future checks *)
72 71
  Global.type_env := Env.overwrite !Global.type_env typ_env;
73 72
  Global.clock_env := Env.overwrite !Global.clock_env clk_env;
......
77 76

  
78 77
  (* Sorting nodes *)
79 78
  let prog = SortProg.sort prog in
80
Format.eprintf "ok1@.";
81 79
  (* Consolidating contracts *)
82 80
  let prog = resolve_contracts prog in
83
Format.eprintf "ok2@.";
84 81
  let prog = SortProg.sort prog in
85
Format.eprintf "ok3@.";
86 82
  Log.report ~level:3 (fun fmt ->
87 83
      Format.fprintf fmt "@[<v 0>Contracts resolved:@ %a@ @]@ " Printers.pp_prog prog);
88 84
  
src/global.ml
6 6
let main_node = ref ""
7 7

  
8 8
module TypeEnv =
9
struct
10
let lookup_value ident = Env.lookup_value !type_env ident
11
let exists_value ident = Env.exists_value !type_env ident
12
let iter f = Env.iter !type_env f
13
let pp pp_fun fmt () = Env.pp_env pp_fun fmt !type_env
14
end
9
  struct
10
    let lookup_value ident = Env.lookup_value !type_env ident
11
    let exists_value ident = Env.exists_value !type_env ident
12
    let iter f = Env.iter !type_env f
13
    let pp pp_fun fmt () = Env.pp_env pp_fun fmt !type_env
14
  end
15 15

  
16 16
let initialize () =
17 17
  begin

Also available in: Unified diff