Matthew Sackman <[EMAIL PROTECTED]> writes:

> On Wed, Sep 05, 2007 at 03:19:02PM +0200, Richard Levitte wrote:
>> In message <[EMAIL PROTECTED]> on Wed, 5 Sep 2007 13:54:23 +0100, Matthew 
>> Sackman <[EMAIL PROTECTED]> said:
>> matthew> Each hook can return one of three values: everything ok;
>> matthew> non-fatal error; fatal error.
>> 
>> Good.  We need to decide how that should work, because nil doesn't
>> necessarely imply an error (let alone that it doesn't describe the
>> fatality of an error).
>
> Right, so if it was Haskell and not lua then it'd be
> (a, ErrorStatus) where a is polymorphic in the type of the
> result of the hook. I suggest something similar - a tuple where one
> indicates the result of the hook (or nil if no result) and the other
> indicates the error.
>
> But this opens up a large pot of worms. If the hook is some sort of
> "does x have permission to do y" then when do you stop? Is it a
> conjunction or disjunction of results? Or is it a 3-valued logic and you
> just go through the list of hooks until you find a definitive
> True/False? In which case, what happens if all functions return "meh"?
>
> Bother. Maybe this should only be permitted on hooks that don't return a
> result. It makes in rather easier... simplest thing first and all
> that?

Is there an inventory of what the current hooks do? We don't want to
have to rewrite a lot of current hook functions for this.

-- 
-- Stephe



_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to