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.71k stars 132 forks source link

add Web.Scotty.Trans.Strict #334

Closed fumieval closed 9 months ago

fumieval commented 9 months ago

One major annoyance with scotty is that some functions unnecessarily take/return lazy Text.

This PR adds a new module Web.Scotty.Trans.Strict which uses strict Text instead

ocramz commented 9 months ago

Maybe a minor thing, but elsewhere .Trans.Strict refers to the evaluation of the effect being non-lazy: https://hackage.haskell.org/package/transformers-0.6.1.1/docs/Control-Monad-Trans-State-Strict.html . Here we have the added complication that ScottyT is not MonadTrans :D

fumieval commented 9 months ago

Thanks for reviewing this. I've just rebased the branch and fixed the problems you pointed out