ScottyはHaskell版のSinatraですね。 普段はFlask使ってるし、NodeでWebアプリ使う時にはExpressを使うので、これ以上Sinatraクローンを覚えたいとは思わないが、ソースコードを読んで勉強するにはちょうどいいサイズだった。 newtype ActionM a = AM { runAM :: ErrorT ActionError (ReaderT ActionEnv (StateT Response IO)) a } deriving ( Monad, MonadIO, Functor , MonadReader ActionEnv, MonadState Response, MonadError ActionError) defaultHandler :: ActionError -> ActionM () defaultHandler (Redirect