File tree Expand file tree Collapse file tree
share-api/src/Share/Postgres Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import Unison.NameSegment.Internal (NameSegment (..))
4040import Unison.Server.HistoryComments.Types
4141import Unison.SyncV2.Types (CBORBytes (.. ))
4242import Unison.Syntax.Name qualified as Name
43+ import UnliftIO (MonadUnliftIO (.. ))
4344
4445-- Orphans for 'Hash'
4546instance Hasql. EncodeValue Hash where
@@ -287,11 +288,11 @@ instance Logging.Loggable Hasql.SessionError where
287288
288289-- | See https://github.com/nikita-volkov/hasql/issues/144
289290-- This instance won't be added upstream.
290- -- instance MonadUnliftIO Hasql.Session where
291- -- withRunInIO inner = do
292- -- conn <- ask
293- -- res <- liftIO $ try $ inner $ \sess -> do
294- -- Hasql.use conn sess >>= either throwIO pure
295- -- case res of
296- -- Left e -> throwError e
297- -- Right a -> pure a
291+ instance MonadUnliftIO Hasql. Session where
292+ withRunInIO inner = do
293+ conn <- ask
294+ res <- liftIO $ try $ inner $ \ sess -> do
295+ Hasql. run sess conn >>= either throwIO pure
296+ case res of
297+ Left e -> throwError e
298+ Right a -> pure a
You can’t perform that action at this time.
0 commit comments