Jonathan Graveline pushed to branch graveline at Stefan / Typer
Commits: df88126a by Jonathan Graveline at 2018-05-26T21:05:59Z Renamed Sexp_print to Sexp_debug_print - - - - -
1 changed file:
- src/eval.ml
Changes:
===================================== src/eval.ml ===================================== --- a/src/eval.ml +++ b/src/eval.ml @@ -298,17 +298,17 @@ let sexp_eq loc depth args_val = match args_val with | [Vsexp (s1); Vsexp (s2)] -> o2v_bool (sexp_equal s1 s2) | _ -> error loc "Sexp.= expects 2 sexps"
-let sexp_p loc depth args_val = match args_val with +let sexp_debug_print loc depth args_val = match args_val with | [Vsexp (s1)] -> (let tstr = (match s1 with - | Block _ -> "Blk" - | Symbol _ -> "Sym" - | String _ -> "Str" - | Integer _ -> "Int" - | Float _ -> "Flt" - | Node _ -> "Nod" + | Block _ -> "Block" + | Symbol _ -> "Symbol" + | String _ -> "String" + | Integer _ -> "Integer" + | Float _ -> "Float" + | Node _ -> "Node" ) in print_string ("\n\t"^tstr^" : ["^(sexp_string s1)^"]\n\n"); Vsexp (s1)) - | _ -> error loc "Sexp.print expects 1 sexps" + | _ -> error loc "Sexp.debug_print expects 1 sexps"
let file_open loc depth args_val = match args_val with | [Vstring (file); Vstring (mode)] -> @@ -698,7 +698,7 @@ let register_builtin_functions () = ("String.concat" , string_concat, 2); ("String.sub" , string_sub, 2); ("Sexp.=" , sexp_eq, 2); - ("Sexp.print" , sexp_p, 1); + ("Sexp.debug_print" , sexp_debug_print, 1); ("Float->String", float_to_string, 1); ("IO.bind" , io_bind, 2); ("IO.return" , io_return, 1);
View it on GitLab: https://gitlab.com/monnier/typer/commit/df88126ad27d63284d962811682f94636157...
Afficher les réponses par date