packages feed

maid 2009.7.25 → 2009.8.16

raw patch · 4 files changed

+26/−16 lines, 4 files

Files

Nemesis view
@@ -1,3 +1,6 @@+import MPS ((-))+import Prelude hiding ((-))+ nemesis = do      clean@@ -7,7 +10,7 @@     ]        desc "prepare cabal dist"-  task "dist" $ do+  task "dist" - do     sh "cabal clean"     sh "cabal configure"     sh "cabal sdist"@@ -16,17 +19,17 @@   task "i" (sh "ghci -isrc src/maid.hs")    desc "put all .hs files in manifest"-  task "manifest" $ do+  task "manifest" - do     sh "find . | grep 'hs$' > manifest"    desc "show sloc"-  task "stat" $ do+  task "stat" - do     sh "cloc -match-f=hs$ --quiet src --no3"      bin "run" "maid"      where-    bin n x = task n $ do-      sh $ "ghc --make -Wall -isrc src/" ++ x ++ ".hs -o .bin/" ++ n-      sh $ "echo done.."-      sh $ ".bin/" ++ n+    bin n x = task n - do+      sh - "ghc --make -Wall -isrc src/" ++ x ++ ".hs -o .bin/" ++ n+      sh - "echo done.."+      sh - ".bin/" ++ n
changelog.md view
@@ -1,3 +1,10 @@+2009.8.16+---------++### Feature++* no $ noise+ 2009.7.25 -------- 
maid.cabal view
@@ -1,5 +1,5 @@ Name:                 maid-Version:              2009.7.25+Version:              2009.8.16 Build-type:           Simple Synopsis:             A simple static web server Description:
src/maid.hs view
@@ -5,12 +5,12 @@ import Hack.Handler.Happstack (runWithConfig, port) import System (getArgs) import MPS.TH (here)-import MPS (splash, tuple2, reject, strip, format_time, now, (/))+import MPS (splash, tuple2, reject, strip, format_time, now, (/), (-)) import Control.Arrow ((>>>)) import Data.Default (def) import Hack.Contrib.Request (url) import Hack-import Prelude hiding ((/))+import Prelude hiding ((/), (-))  main :: IO () main = do@@ -18,27 +18,27 @@   let { port =      if length args == 0       then 3000-      else read $ head args+      else read - head args     }      let { app =-    log_access $ try_index $ loli $ do+    log_access - try_index - loli - do       public (Just ".") [""]       mapM_ (splash mime) mimes     }    putStrLn ""-  putStrLn $ "\226\157\130  Maid serving on port: " ++ show port+  putStrLn - "\226\157\130  Maid serving on port: " ++ show port   putStrLn ""   -  runWithConfig def {port} $ app+  runWithConfig def {port} - app      where     log_access app = \env -> do       time <- now       let time_format = "%Y-%m-%d %H:%M:%S"           time_stamp = format_time time_format time-      putStrLn $ time_stamp ++ "  -  " ++ url env+      putStrLn - time_stamp ++ "  -  " ++ url env       app env            try_index app = \env -> do@@ -64,7 +64,7 @@   >>> map strip   >>> reject null   >>> map (words >>> tuple2)-  $ mime_data+  - mime_data  mime_data :: String mime_data = [$here|