X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fast.ml;h=8e56fb5fbef44d981548d46dd5781d34fee63a6c;hb=54c8ad92025a9c77c2b10644499b3944e1299187;hp=76b0ff35ed836b1c492c3e79aba1799a834fc763;hpb=deb7edaccefe379139818e8b241844b9a0571651;p=goals.git diff --git a/src/ast.ml b/src/ast.ml index 76b0ff3..8e56fb5 100644 --- a/src/ast.ml +++ b/src/ast.ml @@ -54,7 +54,7 @@ and expr = and constant = | CString of string and goal = param_decl list * pattern list * expr list * code option -and func = param_decl list * returning * code +and func = param_decl list * returning * bool * code and tactic = param_decl list * code and param_decl = id and id = string @@ -166,8 +166,9 @@ and string_goal () (name, (param_decls, patterns, exprs, code)) = | Some (code, false) -> " = { ... }" | Some (code, true) -> " = @{ ... }") -and string_func () (name, (param_decls, returning, (code, quiet))) = - sprintf "function%s returning %s (%s) = %s{ ... }" +and string_func () (name, (param_decls, returning, pure, (code, quiet))) = + sprintf "%sfunction%s returning %s (%s) = %s{ ... }" + (if pure then "pure " else "") (match name with None -> "" | Some name -> " " ^ name) (match returning with RetExpr -> "expression" | RetString -> "string"