Fix variable prefix/except bug.

This commit is contained in:
Burke Fetscher 2013-09-04 19:40:07 -05:00
parent 1894e2777c
commit fbfd09e804
2 changed files with 7 additions and 4 deletions

View File

@ -452,9 +452,9 @@
v2
╠════════════════════════╬══════════════════════════╬════════════════════════════════╬═══════════════════════════════╬════════════════╣
(cond (and/fail (u*-2pvars
`(variable-prefix ,p2) [(sym-pref? p1 p2) (andmap v2
`(variable-prefix ,p2)] (curry sym-pref? p2) `(variable-except
[(sym-pref? p2 p1) e1) ,@(compiled-lang-literals L))
`(variable-prefix ,p2) [(sym-pref? p1 p2) (not (ormap v2
`(variable-prefix ,p2)] (curry sym-pref? p2) `(variable-except
[(sym-pref? p2 p1) e1)) ,@(compiled-lang-literals L))
`(variable-prefix ,p1)] v2) L)
[else (unif-fail)])
╠════════════════════════╬══════════════════════════╬════════════════════════════════╣

View File

@ -515,7 +515,8 @@
['variable '(variable-except a)]
['variable-not-otherwise-mentioned '(variable-except a)]
['(variable-except b) '(variable-except a b)]
['(variable-prefix a) '(variable-prefix a)]))
['(variable-prefix a) #f]
['(variable-prefix b) '(variable-prefix b)]))
(unify-all/results/no-bindings
'(variable-prefix a) (hash)
@ -535,6 +536,8 @@
['(nt e) '(cstr (e) (variable-prefix a))]
['variable '(variable-prefix a)]
['variable-not-otherwise-mentioned '(variable-prefix a)]
['(variable-except b bb c) '(variable-prefix a)]
['(variable-except b ab c) #f]
['(variable-prefix a) '(variable-prefix a)]
['(variable-prefix b) #f]))