LGTM, thanks

On Fri, Dec 13, 2013 at 10:38 AM, Klaus Aehlig <[email protected]> wrote:

> > LGTM.
>
> Thanks.
>
> > A shorter version would be `map (second (() <$)) callresult`, which IMHO
> > makes it easier to understand that we're just discarding results. There
> is
> > function `void` in Control.Monad that is equal to (() <$), but
> > unfortunately available only in GHC7.
>
> Nice improvement. Thanks.
>
>     Interdiff [PATCH master 1/7] Generate a separate return type for the
> job queue update RPC
>
> diff --git a/src/Ganeti/JQueue.hs b/src/Ganeti/JQueue.hs
> index c320769..4955e90 100644
> --- a/src/Ganeti/JQueue.hs
> +++ b/src/Ganeti/JQueue.hs
> @@ -62,6 +62,7 @@ import Control.Arrow (second)
>  import Control.Concurrent.MVar
>  import Control.Exception
>  import Control.Monad
> +import Data.Functor ((<$))
>  import Data.List
>  import Data.Maybe
>  import Data.Ord (comparing)
> @@ -384,7 +385,7 @@ replicateJob rootdir mastercandidates job = do
>        content = Text.JSON.encode . Text.JSON.showJSON $ job
>    callresult <- executeRpcCall mastercandidates
>                    $ RpcCallJobqueueUpdate filename content
> -  let result = map (second (either Left (const $ Right ()))) callresult
> +  let result = map (second (() <$)) callresult
>    logRpcErrors result
>    return result
>
>
>
> --
> Klaus Aehlig
> Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
> Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores
>

Reply via email to