How do I use a persistent State monad with Spock?
问题 I'm just starting out with haskell and I'm having issues with a basic "echo" REST server. Spock looked like a nice starting place for a REST server, and I though I got the basics of the State monad, but I'm having issues understanding how to put a runState around the spock code. Here's the code I've got so far. {-# LANGUAGE OverloadedStrings #-} module Main where import Data.Monoid import Web.Spock.Safe import qualified Control.Monad.State as S storeData :: String -> S.State String String