
Hi Michael,
Michael Snoyman
When I was at QCon, I heard a talk from Steve Vinoski on Webmachine, and I was surprised to hear how close webmachine was to Haskell already, The concept is basically sticking a state monad on top of WAI. My guess is you would want to use a record type for a Resource, not a typeclass, to make it easier to swap out behaviors. But honestly, I haven't given this any thought since I saw the presentation 6 months ago.
Thanks for your insight, I didn't even consider using record types for a resource. Will also read up upon state monads. I believe that Webmachine passes a dictionary to every function in the HTTP graph[1]. Do you see the state monad having this purpose? [1]: https://bitbucket.org/justin/webmachine/wiki/BigHTTPGraph -- Petar Radosevic | @wunki