From 8936e6211e31c016b0a2e9f96d54d1ae99659256 Mon Sep 17 00:00:00 2001 From: krangelov Date: Tue, 7 Sep 2021 13:31:28 +0200 Subject: [PATCH] add <*> to Applicative for Transaction --- src/runtime/haskell/PGF2/Transactions.hsc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/runtime/haskell/PGF2/Transactions.hsc b/src/runtime/haskell/PGF2/Transactions.hsc index 2800e5fc0..b7700b1db 100644 --- a/src/runtime/haskell/PGF2/Transactions.hsc +++ b/src/runtime/haskell/PGF2/Transactions.hsc @@ -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