Jonathan Graveline pushed to branch graveline at Stefan / Typer
Commits: cdc94f8b by Jonathan Graveline at 2018-05-17T22:10:37Z Change from master - - - - -
1 changed file:
- src/eval.ml
Changes:
===================================== src/eval.ml ===================================== --- a/src/eval.ml +++ b/src/eval.ml @@ -3,7 +3,7 @@ * * --------------------------------------------------------------------------- * - * Copyright (C) 2011-2017 Free Software Foundation, Inc. + * Copyright (C) 2011-2018 Free Software Foundation, Inc. * * Author: Pierre Delaunay pierre.delaunay@hec.ca * Keywords: languages, lisp, dependent types. @@ -683,8 +683,6 @@ let register_builtin_functions () = ("Sexp.node" , make_node, 2); ("Sexp.dispatch" , sexp_dispatch, 7); ("String.=" , string_eq, 2); - ("String.concat" , string_concat, 2); - ("String.sub" , string_sub, 3); ("Sexp.=" , sexp_eq, 2); ("Float->String", float_to_string, 1); ("IO.bind" , io_bind, 2); @@ -780,21 +778,16 @@ let from_lctx (lctx: lexp_context): runtime_env = rctx | CVfix (defs, lctx) -> let fvs = List.fold_left - (fun fvs (_, odef, _) - -> match odef with - | LetDef e - -> OL.fv_union fvs (OL.fv (L.clean e)) - | _ -> fvs) + (fun fvs (_, e, _) + -> OL.fv_union fvs (OL.fv (L.clean e))) OL.fv_empty defs in let rctx = from_lctx lctx in let (nrctx, evs, alldefs) - = List.fold_left (fun (rctx, evs, alldefs) (loname, odef, _) + = List.fold_left (fun (rctx, evs, alldefs) (loname, e, _) -> let rc = ref Vundefined in let nrctx = Myers.cons (roname loname, rc) rctx in - match odef with - | LetDef e -> (nrctx, (e, rc)::evs, alldefs) - | _ -> nrctx, [], false) + (nrctx, (e, rc)::evs, alldefs)) (rctx, [], true) defs in let _ = (* FIXME: Evaluate those defs that we can, even if not all defs
View it on GitLab: https://gitlab.com/monnier/typer/commit/cdc94f8bff38a95e7c15a0f12dfe53fc1149...
Afficher les réponses par date