diff options
author | Stefan Monnier <[email protected]> | 2013-10-29 10:46:23 -0400 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2013-10-29 10:46:23 -0400 |
commit | dee4ba59792238f9fd69ba7f5bf4f2711da52030 (patch) | |
tree | da0a9787aab3899e967618f493e16b56be8ed47d /test/indent/prolog.prolog | |
parent | e54711f396a93b280f6a8b879330e0780425c1ae (diff) |
* src/eval.c (run_hook_with_args): Use FUNCTIONP.
* test/indent/css-mode.css (.x2): Test alignement inside braces.
* test/indent/prolog.prolog: Test alignment of ->; with operator at bol.
Diffstat (limited to 'test/indent/prolog.prolog')
-rw-r--r-- | test/indent/prolog.prolog | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/indent/prolog.prolog b/test/indent/prolog.prolog index 8af21877b5..5b5d272c57 100644 --- a/test/indent/prolog.prolog +++ b/test/indent/prolog.prolog @@ -48,7 +48,19 @@ subst(X, V, FV, lambda(Y, Ti, Bi), lambda(Y1, To, Bo)) :- subst(Y, Y1, [], Bi, Bi1); Y1 = Y, Bi1 = Bi), %% Perform substitution on the body. - subst(X, V, FV, Bi1, Bo)). + subst(X, V, FV, Bi1, Bo)), + ( X = Y + %% If X is equal to Y, X is shadowed, so no subst can take place. + -> Y1 = Y, Bo = Bi + ; (member((Y, _), FV) + %% If Y appears in FV, it can appear in V, so we need to + %% rename it to avoid name capture. + -> new_atom(Y, Y1), + subst(Y, Y1, [], Bi, Bi1) + ; Y1 = Y, Bi1 = Bi), + %% Perform substitution on the body. + subst(X, V, FV, Bi1, Bo) + ). subst(X, V, FV, pi(Y, Ti, Bi), pi(Y1, To, Bo)) :- subst(X, V, FV, lambda(Y, Ti, Bi), lambda(Y1, To, Bo)). subst(X, V, FV, forall(Y, Ti, Bi), forall(Y1, To, Bo)) :- |