Clojure has "Web Development with Clojure" which is basically what I listed above, except for Clojure rather than Haskell.
Clojure has "Web Development with Clojure" which is basically what I listed above, except for Clojure rather than Haskell.
I may write up a blogpost on getting this far. It's mostly based on this: https://www.fpcomplete.com/school/starting-with-haskell/libr... . I didn't do much beyond figure out explictly using L.fromStrict to deal with conflicting interpretations of overloaded-strings and figuring out how where to put my fillDB and getComments functions in main. I initially tried to call these within the scotty monad, but I think doing it that way would have required learning about monad transformers.
I'm hoping to eventually turn this into a simple disqus alternative that should be lightweight and easy to distribute as a binary.
Although it uses virthualenv instead of a cabal sandbox.
end result here, which I think should serve as a good starter point for developing with Scotty:
https://github.com/chrissrogers/chrissrogers.com
For Heroku builds I used the following excellent buildpack
but it seems well written if you can get past that point. Most beginners won't though.
I personally don't understand the draw of scotty because as soon as you want to start doing more substantial web development, you're going to want higher level abstractions. The Snap Framework adds to this in a pretty flexible and not-too-opinionated way with snaplets which are implemented in the snap package. The snap package also contains a few core snaplets that almost every application will want out of the box like sessions, auth, and a snaplet for Heist templating. The Heist part is the only place where the snap package gets opinionated. But you are definitely not locked into using Heist. You could very easily use Yesod's Hamlet, HStringTemplate, hastache, or anything else. Heist just happens to be the direction that the core Snap developers seem to prefer.