Bump opium

This commit is contained in:
Paul Brinkmeier
2025-07-20 02:54:48 +02:00
parent 1a6d2cadad
commit 80f2e52327
6 changed files with 17 additions and 6 deletions
+1
View File
@@ -0,0 +1 @@
module Yore.Download () where
+5 -1
View File
@@ -1,3 +1,4 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
module Yore.Repl (connect, exec) where
@@ -5,7 +6,10 @@ module Yore.Repl (connect, exec) where
import qualified Database.PostgreSQL.Opium as Opium
connect :: IO Opium.Connection
connect = Opium.connect "host=localhost"
connect =
Opium.connect "host=localhost" >>= \case
Left e -> error $ show e
Right c -> pure c
exec :: (Opium.Connection -> IO a) -> IO a
exec f = f =<< connect