From c3c3e9e9b5bb4c96820bc6e9372abae30d77bdfe Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Fri, 3 Mar 2017 13:18:52 +0000 Subject: [PATCH] Force users to write (bash ...) when they want it --- src/action.ml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/action.ml b/src/action.ml index 548288f9..de79f18e 100644 --- a/src/action.ml +++ b/src/action.ml @@ -63,6 +63,7 @@ module Mini_shexp = struct ; cstr "copy-and-add-line-directive" (p @> p @> nil) (fun src dst -> Copy_and_add_line_directive (src, dst)) ; cstr "system" (a @> nil) (fun cmd -> System cmd) + ; cstr "bash" (a @> nil) (fun cmd -> Bash cmd) ] sexp @@ -108,14 +109,9 @@ module Mini_shexp = struct module Unexpanded = struct type t = (String_with_vars.t, String_with_vars.t) Ast.t - + let t = Ast.t String_with_vars.t String_with_vars.t sexp let sexp_of_t = Ast.sexp_of_t String_with_vars.sexp_of_t String_with_vars.sexp_of_t - let t sexp = - match sexp with - | Atom _ -> Bash (String_with_vars.t sexp) - | List _ -> Ast.t String_with_vars.t String_with_vars.t sexp - let fold_vars t ~init ~f = Ast.fold t ~init ~f:(fun acc pat -> String_with_vars.fold ~init:acc pat ~f)