# HG changeset patch # User Daichi TOMA # Date 1392113611 -32400 # Node ID 62ce408561ac692f4acac57f8c065ebec193598f add hello diff -r 000000000000 -r 62ce408561ac Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile Tue Feb 11 19:13:31 2014 +0900 @@ -0,0 +1,11 @@ +# we should use cabal +RCPUS = 12 + +default: hello + ./hello +RTS -K1G -N$(RCPUS) + +hello: *.hs + ghc -O2 hello.hs -rtsopts -threaded + +clean: + rm *.o *.hi hello diff -r 000000000000 -r 62ce408561ac hello.hs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hello.hs Tue Feb 11 19:13:31 2014 +0900 @@ -0,0 +1,10 @@ +{-# LANGUAGE OverloadedStrings #-} +import Network.Wai +import Network.HTTP.Types (status200) +import Network.Wai.Handler.Warp (run) +import Data.ByteString.Lazy.UTF8 (fromString) + +application _ = return $ + responseLBS status200 [("Content-Type", "text/plain")] "hello world" + +main = run 8080 application