Skip to content

Instantly share code, notes, and snippets.

@EarlGray
Created September 30, 2013 15:06
Show Gist options
  • Save EarlGray/6765139 to your computer and use it in GitHub Desktop.
Save EarlGray/6765139 to your computer and use it in GitHub Desktop.
Happstack logging snippets for a wordpress blog
import Happstack.Server
import System.Environment
import Control.Monad (when)
main = do
args <- getArgs
when (length args < 2) $ error "Usage: ./HelloHTTP "
simpleHTTP nullConf $ serveDirectory EnableBrowsing ["index.htm"] (head args)
λ> import Control.Monad.IO.Class
λ> :i liftIO
class Monad m => MonadIO m where
liftIO :: IO a -> m a
-- Defined in `Control.Monad.IO.Class’
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment