Skip to content
Snippets Groups Projects

view: change to a more natural semantics

Merged Vladimír Čunát requested to merge view into master
Files
11
+ 6
0
@@ -549,12 +549,18 @@ end
-- as a dependency chain, e.g. r1,r2,r3 -> r3(r2(r1(state)))
policy.layer = {
begin = function(state, req)
-- Don't act on "resolved" cases.
if bit.band(state, bit.bor(kres.FAIL, kres.DONE)) ~= 0 then return state end
req = kres.request_t(req)
return policy.evaluate(policy.rules, req, req:current(), state) or
policy.evaluate(policy.special_names, req, req:current(), state) or
state
end,
finish = function(state, req)
-- Don't act on "resolved" cases.
if bit.band(state, bit.bor(kres.FAIL, kres.DONE)) ~= 0 then return state end
req = kres.request_t(req)
return policy.evaluate(policy.postrules, req, req:current(), state) or state
end
Loading