monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Hooks...


From: Stephen Leake
Subject: Re: [Monotone-devel] Hooks...
Date: Wed, 05 Sep 2007 17:53:31 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt)

Matthew Sackman <address@hidden> writes:

> On Wed, Sep 05, 2007 at 03:19:02PM +0200, Richard Levitte wrote:
>> In message <address@hidden> on Wed, 5 Sep 2007 13:54:23 +0100, Matthew 
>> Sackman <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]