When I use yesod devel
it just recompiles whole application every time I change template file or any module.
Is there any way to get faster feedback on development? I mean do not recompile, but use ghci
or something with Yesod?
When I use yesod devel
it just recompiles whole application every time I change template file or any module.
Is there any way to get faster feedback on development? I mean do not recompile, but use ghci
or something with Yesod?
I'm not familiar with Yesod, but I often build web applications in GHCi by continually restarting the web server. For instance, using something like async
we can set up a server thread which dies after 15 seconds (enough time perhaps to test a feature).
-- | run 'defaultMain' for a few seconds then kill it
quicky :: IO ()
quicky = Async.withAsync defaultMain $ \_ ->
replicateM_ 3 (threadDelay (round 5e6) >> putStrLn "(tick)")
I've used this directly atop Warp in the past quite successfully.
I've never tried it myself, but I think that what you're looking for is wai-handler-devel. Quoting the documentation:
It's also mentioned in the yesod book, which also has useful information: