Adde:
> data TransactionT = forall c. (Connection c) => TransactionT c
>
> data Transaction a = Transaction (TransactionT -> (a, TransactionT))
>
> getConnection :: Transaction c
> getConnection = Transaction (\t@(TransactionT c) -> (c, t))
>
> class Connection c where
> connectionExecute :: c
Hi.
I'm experimenting with implementing database transactions as monads but I'm
getting stuck on how to store a generic connection (only constrained by a
typeclass) inside the transaction. The reason I'm doing it this way is that
the connection could be a different kind of structure depending on