| 163 |
let v = Eval.eval Eval.Env.empty e in |
let v = Eval.eval Eval.Env.empty e in |
| 164 |
if not !quiet then |
if not !quiet then |
| 165 |
Format.fprintf ppf "=> @[%a@]@\n@." print_value v |
Format.fprintf ppf "=> @[%a@]@\n@." print_value v |
| 166 |
| Ast.LetDecl (p,{descr=Ast.Abstraction _}) -> () |
| Ast.LetDecl (p,Ast.Abstraction _) -> () |
| 167 |
| Ast.LetDecl (p,e) -> |
| Ast.LetDecl (p,e) -> |
| 168 |
let decl = Typer.let_decl p e in |
let decl = Typer.let_decl p e in |
| 169 |
type_decl decl; |
type_decl decl; |
| 181 |
List.iter eval_decl decls |
List.iter eval_decl decls |
| 182 |
in |
in |
| 183 |
let rec phrases funs = function |
let rec phrases funs = function |
| 184 |
| { descr = Ast.LetDecl (p,({descr=Ast.Abstraction _} as e))} :: phs -> |
| { descr = Ast.LetDecl (p,(Ast.Abstraction _ as e)) } :: phs -> |
| 185 |
phrases ((p,e)::funs) phs |
phrases ((p,e)::funs) phs |
| 186 |
| ph :: phs -> |
| ph :: phs -> |
| 187 |
do_fun_decls funs; |
do_fun_decls funs; |
| 201 |
List.fold_left |
List.fold_left |
| 202 |
(fun ((typs,funs) as accu) ph -> match ph.descr with |
(fun ((typs,funs) as accu) ph -> match ph.descr with |
| 203 |
| Ast.TypeDecl (x,t) -> ((x,t) :: typs,funs) |
| Ast.TypeDecl (x,t) -> ((x,t) :: typs,funs) |
| 204 |
| Ast.LetDecl (p,({descr=Ast.Abstraction _} as e)) -> |
| Ast.LetDecl (p,(Ast.Abstraction _ as e)) -> |
| 205 |
(typs, (p,e)::funs) |
(typs, (p,e)::funs) |
| 206 |
| _ -> accu |
| _ -> accu |
| 207 |
) ([],[]) p in |
) ([],[]) p in |