silkapp / rest

Packages for defining APIs, running them, generating client code and documentation.
http://silkapp.github.io/rest
390 stars 52 forks source link

generalize Snap monad to MonadSnap #154

Closed theNerd247 closed 6 years ago

theNerd247 commented 6 years ago

It would be nice to use rest in a snaplet (not just a base snap). I've extended the functionality of rest-snap to allow any monad that is an instance of MonadSnap to be used in the apiToHandler' interface.

bergmark commented 6 years ago

Thanks! Looks great.

I added a commit deriving Functor/Applicative/Monad, does that look ok?

theNerd247 commented 6 years ago

Yup! I'll squash the commits

bergmark commented 6 years ago

Cool, though FYI I can choose to squash when merging on github :)

bergmark commented 6 years ago

Was hoping to release this now but travis is having some issues so I'll check in later

theNerd247 commented 6 years ago

It's not liking the derive generic for ghc 7.10

On Tue, Oct 31, 2017, 12:47 PM Adam Bergmark notifications@github.com wrote:

Was hoping to release this now but travis is having some issues so I'll check in later

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/silkapp/rest/pull/154#issuecomment-340826081, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3mj4GQoR9VBfjKQcCyHn44d_TKusi6ks5sx086gaJpZM4QKLNM .

bergmark commented 6 years ago

Hmm, where do you see this? Travis seems happy: https://travis-ci.org/silkapp/rest/builds/295371487

theNerd247 commented 6 years ago

AH sorry. I thought you were refering to before you merged... nevermind on that comment

bergmark commented 6 years ago

Shipped https://hackage.haskell.org/package/rest-snap-0.3.0.0

theNerd247 commented 6 years ago

will this update automagically on stackage? And will the haddock documentation be generated?

bergmark commented 6 years ago

Yepyep, both those steps are automated