scotty-web / scotty

Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp (Official Repository)
http://hackage.haskell.org/package/scotty
BSD 3-Clause "New" or "Revised" License
1.72k stars 134 forks source link

Scotty vs. WAI 3.0 continuation-passing style #260

Closed florpe closed 11 months ago

florpe commented 4 years ago

I've been trying unsuccessfully to write a function ScottyM () -> ActionM () (or WAI.Application -> ActionM (), really) in order to use Scotty applications as plugins. As far as I can tell the main difficulty with this is that Scotty still uses the pre-WAI 3.0 style of application internally. Is there a technical reason for this, or would it be worthwhile to try and migrate Scotty to CPS?

chessai commented 4 years ago

Investigating this might be worthwhile. The design of scotty is pretty old, and I have gripes with a lot of it.

jfraudeau commented 11 months ago

Not sure how it relates to WAI 3.0 but it looks like the use case was implemented in https://github.com/scotty-web/scotty/pull/233

@florpe If it is still relevant to you can you confirm ?

ocramz commented 11 months ago

Yep, now we have nested as @jfraudeau pointed out. Thanks!