Skip to content

Commit c5820ec

Browse files
author
Patrick Thomson
committed
Remove unused TransactionalStore typeclass.
No one actually uses this typeclass, as it provides no mechanism for retrieving the connection from a monadic context. We all just write `transact` functions, which is a perfectly acceptable compromise.
1 parent 990dff6 commit c5820ec

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/Database/PostgreSQL/TransactionalStore.hs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
module Database.PostgreSQL.TransactionalStore
77
( PGTransaction
8-
, TransactionalStore (..)
98
, runPGTransaction
109
, runPGTransaction'
1110
, query
@@ -46,14 +45,6 @@ runPGTransaction' isolation (PGTransaction pgTrans) conn =
4645
runPGTransaction :: MonadIO m => PGTransaction a -> Postgres.Connection -> m a
4746
runPGTransaction = runPGTransaction' Postgres.Transaction.DefaultIsolationLevel
4847

49-
-- | Used to execute a `HeliumStore' `m' value inside of a transaction, with
50-
-- connection/state `a', with effects in `n'.
51-
class TransactionalStore a m n where
52-
runTransaction :: m b -> a -> n b
53-
54-
instance MonadIO m => TransactionalStore Postgres.Connection PGTransaction m where
55-
runTransaction = runPGTransaction
56-
5748
-- | Issue an SQL query, taking a 'ToRow' input and yielding 'FromRow' outputs.
5849
query :: (ToRow input, FromRow output)
5950
=> Postgres.Query

0 commit comments

Comments
 (0)