Revision 3050ca8f
Added by Pierre-Loïc Garoche almost 3 years ago
src/modules.ml | ||
---|---|---|
207 | 207 |
content = lusic.Lusic.contents; |
208 | 208 |
is_stateful = is_stateful } in |
209 | 209 |
|
210 |
(* Returning the prog without the Open, the deps with the new
|
|
211 |
one and the updated envs *)
|
|
212 |
accu_prog, (new_dep::accu_dep), typ_env, clk_env |
|
210 |
(* Returning the prog while keeping the Open, the deps with the new
|
|
211 |
elements and the updated envs *)
|
|
212 |
decl::accu_prog, (new_dep::accu_dep), typ_env, clk_env
|
|
213 | 213 |
) |
214 | 214 |
| Include name -> |
215 | 215 |
let basename = Options_management.name_dependency (true, name) "" in |
216 | 216 |
if Filename.check_suffix basename ".lus" then |
217 | 217 |
let include_src = Compiler_common.parse basename ".lus" in |
218 |
load_rec ~is_header:false accu include_src |
|
218 |
let (accu_prog, accu_dep, typ_env, clk_env) = |
|
219 |
load_rec ~is_header:false accu include_src |
|
220 |
in |
|
221 |
decl::accu_prog, accu_dep, typ_env, clk_env |
|
219 | 222 |
else |
220 | 223 |
raise (Error (decl.top_decl_loc, LoadError("include requires a lustre file"))) |
221 | 224 |
|
Also available in: Unified diff
keep the open top declaration when loading a module. It may be useful later when producing a lustre file