Created
September 30, 2013 15:06
-
-
Save EarlGray/6765139 to your computer and use it in GitHub Desktop.
Happstack logging snippets for a wordpress blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ> 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