I'd like to add the following interdiff, which generalizes the instance
MonadBaseControl IO (ResultT a m), which will be needed for the WConfdMonad:
diff --git a/src/Ganeti/BasicTypes.hs b/src/Ganeti/BasicTypes.hs
index f85a13c..30ebc8b 100644
--- a/src/Ganeti/BasicTypes.hs
+++ b/src/Ganeti/BasicTypes.hs
@@ -189,9 +189,10 @@ instance (Error a) => MonadTransControl (ResultT a)
where
{-# INLINE liftWith #-}
{-# INLINE restoreT #-}
-instance (Error a) => MonadBaseControl IO (ResultT a IO) where
- newtype StM (ResultT a IO) b
- = StMResultT { runStMResultT :: ComposeSt (ResultT a) IO b }
+instance (Error a, MonadBaseControl IO m)
+ => MonadBaseControl IO (ResultT a m) where
+ newtype StM (ResultT a m) b
+ = StMResultT { runStMResultT :: ComposeSt (ResultT a) m b }
liftBaseWith = defaultLiftBaseWith StMResultT
restoreM = defaultRestoreM runStMResultT
{-# INLINE liftBaseWith #-}
On Thu, Feb 13, 2014 at 2:57 PM, Klaus Aehlig <[email protected]> wrote:
> On Thu, Feb 13, 2014 at 02:19:31PM +0100, Petr Pudlak wrote:
> > This allows to use lifted operations like 'fork' or 'bracket' inside
> > ResultT.
> >
> > Signed-off-by: Petr Pudlak <[email protected]>
> > ---
> > src/Ganeti/BasicTypes.hs | 27 ++++++++++++++++++++++++++-
> > 1 file changed, 26 insertions(+), 1 deletion(-)
>
> LGTM
>
> --
> 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
>