valderman / selda

A type-safe, high-level SQL library for Haskell
https://selda.link
MIT License
478 stars 58 forks source link

Why StateT instead of ReaderT? #161

Closed YPares closed 3 years ago

YPares commented 3 years ago

Hi! Is there a reason why SeldaT is implemented using a StateT instead of ReaderT? The internal state seems to already be managed via IORefs/MVars, and the instead MonadSelda (SeldaT b m) doesn't seem to need put anyway. Making it a StateT prevents it from implementing useful interop classes like MonadUnliftIO.

YPares commented 3 years ago

I opened an MR to propose the change