| 200 |
insert_type_bindings (Typer.type_rec_funs !typing_env decls); |
insert_type_bindings (Typer.type_rec_funs !typing_env decls); |
| 201 |
List.iter eval_decl decls |
List.iter eval_decl decls |
| 202 |
in |
in |
| 203 |
|
let rec phrases funs = function |
| 204 |
|
| { descr = Ast.LetDecl (p,({descr=Ast.Abstraction _} as e))} :: phs -> |
| 205 |
|
phrases ((p,e)::funs) phs |
| 206 |
|
| ph :: phs -> |
| 207 |
|
do_fun_decls funs; |
| 208 |
|
phrase ph; |
| 209 |
|
phrases [] phs |
| 210 |
|
| _ -> |
| 211 |
|
do_fun_decls funs |
| 212 |
|
in |
| 213 |
try |
try |
| 214 |
let p = |
let p = |
| 215 |
try Parser.prog input |
try Parser.prog input |
| 226 |
| _ -> accu |
| _ -> accu |
| 227 |
) ([],[]) p in |
) ([],[]) p in |
| 228 |
glb_env := Typer.register_global_types !glb_env type_decls; |
glb_env := Typer.register_global_types !glb_env type_decls; |
| 229 |
do_fun_decls fun_decls; |
phrases [] p; |
|
List.iter phrase p; |
|
| 230 |
true |
true |
| 231 |
with |
with |
| 232 |
| (Failure _ | Not_found | Invalid_argument _) as e -> |
| (Failure _ | Not_found | Invalid_argument _) as e -> |