From Erights

(Difference between revisions)
Jump to: navigation, search
(better optUncall markup, restore lost getguard doc)
(wrong name for ExitFunction)
(5 intermediate revisions not shown)
Line 5: Line 5:
{{maker msgdoc|run|3|<var>guard</var> :[[Guard]], <var>specimen</var>, <var>ejector</var> :[[ExitFunc]]|[[CoercedSlot]]}}
{{maker msgdoc|run|3|<var>guard</var> :[[Guard]], <var>specimen</var>, <var>ejector</var> :[[ExitFunction]]|[[CoercedSlot]]}}
Makes a CoercedSlot holding the result of <var>guard</var>.coerce(<var>specimen</var>, <var>ejector</var>).
Makes a CoercedSlot holding the result of <var>guard</var>.coerce(<var>specimen</var>, <var>ejector</var>).

Latest revision as of 04:51, 8 November 2008

This is a module used by the guard-based auditing proposal, though it can stand alone.

CoercedSlots implement the Slot protocol. They hold a single value, and the guard it was coerced by; they are immutable.




run(guard :Guard, specimen, ejector :ExitFunction) :CoercedSlot

Makes a CoercedSlot holding the result of guard.coerce(specimen, ejector).


attempt(guard :Guard, specimen) :CoercedSlot

As run/1 unless the guard ejects, in which case the resulting slot's guard will be LostApproval[guard].



Signature: getGuard() :Guard

Returns the guard that this slot's value was coerced, or otherwise approved, by.


__optUncall() :Portrayal

Returns a portrayal in terms of #attempt/1.

Personal tools
more tools