1
0
forked from GitHub/gf-core

add <*> to Applicative for Transaction

This commit is contained in:
krangelov
2021-09-07 13:31:28 +02:00
parent 31396e46e3
commit 8936e6211e

View File

@@ -24,6 +24,10 @@ instance Functor Transaction where
instance Applicative Transaction where
pure x = Transaction $ \c_db c_revision c_exn -> return x
f <*> g = do
f <- f
g <- g
return (f g)
instance Monad Transaction where
(Transaction f) >>= g = Transaction $ \c_db c_revision c_exn -> do