On Fri, Nov 8, 2013 at 11:14 AM, Klaus Aehlig <[email protected]> wrote: >> LGTM, thanks. > > Sorry, I forgot to update the comment as well; so I'd like to > include the following interdiff. > > Interdiff patch 08/22 Provide function to obtain the single element of a > list > > diff --git a/src/Ganeti/Utils.hs b/src/Ganeti/Utils.hs > index b7cd756..1356c47 100644 > --- a/src/Ganeti/Utils.hs > +++ b/src/Ganeti/Utils.hs > @@ -426,7 +426,7 @@ exitIfEmpty :: String -> [a] -> IO a > exitIfEmpty _ (x:_) = return x > exitIfEmpty s [] = exitErr s > > --- | Obtain the only element of a list in the Result monad. > +-- | Obtain the unique element of a list in an arbitrary monad. > monadicThe :: (Eq a, Monad m) => String -> [a] -> m a > monadicThe s [] = fail s > monadicThe s (x:xs)
LGTM, thanks. Michele -- Google Germany GmbH Dienerstr. 12 80331 München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores
