agrafix / Spock

Another Haskell web framework for rapid development
https://www.spock.li
678 stars 56 forks source link

instance of MonadBaseControl and MonadTransControl for ActionCtxT #116

Closed cdepillabout closed 7 years ago

cdepillabout commented 7 years ago

Would you consider adding instances of MonadTransControl and MonadBaseControl for ActionCtxT?

Since ActionCtxT is just a newtype around ErrorT and RWST, it should be relatively easy to add instances for MonadTransControl and MonadBaseControl.

It looks like Spock-core doesn't already have a dependency on monad-control (but Spock does), so this would require adding monad-control as a dependency to Spock-core

If you don't want to do that, would you consider exporting the constructor for ActionCtxT (possibly in an Internal module) so that users could write orphan instances for MonadTransControl and MonadBaseControl?

Let me know how you feel and I'll send a PR.

agrafix commented 7 years ago

Sounds good of adding the dependency and class instance to Spock-core.

cdepillabout commented 7 years ago

Okay, sounds good. I'll send a PR adding instances for MonadTransControl and MonadBaseControl to ActionCtxT.

agrafix commented 7 years ago

Cool, thanks :-)