<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,6 @@
+import Prelude hiding ((.), (-))
+import MPS.Light
+
 nemesis = do
   
   clean
@@ -10,20 +13,20 @@ nemesis = do
     ]
     
   desc &quot;prepare cabal dist&quot;
-  task &quot;dist&quot; $ do
+  task &quot;dist&quot; - do
     sh &quot;cabal clean&quot;
     sh &quot;cabal configure&quot;
     sh &quot;cabal sdist&quot;
 
   desc &quot;put all .hs files in manifest&quot;
-  task &quot;manifest&quot; $ do
-    sh &quot;find . | grep 'hs$' &gt; manifest&quot;
+  task &quot;manifest&quot; - do
+    sh &quot;find . | grep 'hs-' &gt; manifest&quot;
 
 
 
   desc &quot;show sloc&quot;
-  task &quot;stat&quot; $ do
-    sh &quot;cloc -match-f=hs$ --quiet src --no3&quot;
+  task &quot;stat&quot; - do
+    sh &quot;cloc -match-f=hs- --quiet src --no3&quot;
     
 
   ghci &quot;template&quot; &quot;Network/Loli/Template&quot;
@@ -38,19 +41,19 @@ nemesis = do
   
   -- test
   
-  task &quot;tl&quot; $ sh &quot;curl j:3000&quot;
-  task &quot;tp&quot; $ sh &quot;curl -d 'src=print' j:3000&quot;
+  task &quot;tl&quot; - sh &quot;curl j:3000&quot;
+  task &quot;tp&quot; - sh &quot;curl -d 'src=print' j:3000&quot;
 
   -- deploy
-  task &quot;deploy&quot; $ sh &quot;scp -C .bin/paste easymic.com:~/link/loli/.bin&quot;
+  task &quot;deploy&quot; - sh &quot;scp -C .bin/paste easymic.com:~/link/loli/.bin&quot;
 
-  task &quot;start&quot; $ do
+  task &quot;start&quot; - do
     sh &quot;echo starting..&quot;
     sh &quot;.bin/paste&quot;
   
   where
-    ghci n x = task n $ sh $ &quot;ghci -isrc src/&quot; ++ x ++ &quot;.hs&quot;
-    bin n x = task n $ do
-      sh $ &quot;ghc --make -Wall -isrc src/&quot; ++ x ++ &quot;.hs -o .bin/&quot; ++ n
-      sh $ &quot;echo done..&quot;
-      sh $ &quot;.bin/&quot; ++ n
+    ghci n x = task n - sh - &quot;ghci -isrc src/&quot; ++ x ++ &quot;.hs&quot;
+    bin n x = task n - do
+      sh - &quot;ghc --make -Wall -isrc src/&quot; ++ x ++ &quot;.hs -o .bin/&quot; ++ n
+      sh - &quot;echo done..&quot;
+      sh - &quot;.bin/&quot; ++ n</diff>
      <filename>Nemesis</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,11 @@
+2009.8.16
+---------
+
+### Feature
+
+* use hackCache for performance
+* no $ noise
+
 2009.7.2
 --------
 </diff>
      <filename>changelog.md</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 Name:                 loli
-Version:              2009.7.2
+Version:              2009.8.16
 Build-type:           Simple
 Synopsis:             A minimum web dev DSL in Haskell
 Description:</diff>
      <filename>loli.cabal</filename>
    </modified>
    <modified>
      <diff>@@ -9,11 +9,11 @@ loli is a DSL built on hack. It allows you to easily define routes, build your c
         import Network.Loli
         import Hack.Handler.Happstack
 
-        main = run . loli $ get &quot;/&quot; (text &quot;loli power&quot;)
+        main = run . loli - get &quot;/&quot; (text &quot;loli power&quot;)
         
 * route
 
-        get &quot;/hello&quot; $ do
+        get &quot;/hello&quot; - do
           text &quot;hello&quot;
 
     will route &quot;/hello&quot; to a controller that outputs hello.
@@ -35,7 +35,7 @@ loli is a DSL built on hack. It allows you to easily define routes, build your c
 
     After implementing your own template engine, you can use
     
-        output $ your-engine-constructor &quot;template-name&quot;
+        output - your-engine-constructor &quot;template-name&quot;
 
 * demo
 </diff>
      <filename>release.md</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
 import Hack.Handler.Happstack
 import Data.ByteString.Lazy.Char8 
 import Hack
-import Prelude hiding ((.), (&gt;), (/), (^))
+import Prelude hiding ((.), (&gt;), (/), (^), (-))
 import MPS.Light
 import Hack.Contrib.Response
 import Data.Default
@@ -14,6 +14,6 @@ app = \env -&gt; do
   return r
 
 
--- main' = run . loli $ get &quot;/&quot; (text &quot;loli power&quot;)
+-- main' = run . loli - get &quot;/&quot; (text &quot;loli power&quot;)
 
 main = run app
\ No newline at end of file</diff>
      <filename>src/Debug/Debug.hs</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ import Hack.Contrib.Middleware.Config
 import Hack.Contrib.Middleware.ContentLength
 import Hack.Contrib.Middleware.ContentType
 import Network.Loli.Utils
-import Prelude hiding ((.), (&gt;), (^))
+import Prelude hiding ((.), (&gt;), (^), (-))
 
 
 pre_installed_middlewares :: [Middleware]</diff>
      <filename>src/Network/Loli/Config.hs</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@ import Network.Loli.Engine
 import Network.Loli.Middleware.IOConfig
 import Network.Loli.Type
 import Network.Loli.Utils
-import Prelude hiding ((.), (&gt;), (^))
+import Prelude hiding ((.), (&gt;), (^), (-))
 import qualified Control.Monad.State as State
 
 
@@ -21,10 +21,10 @@ app f = ask &gt;&gt;= (f &gt; io) &gt;&gt;= State.put
 
 
 layout :: String -&gt; Unit
-layout x = middleware $ config (set_namespace loli_config loli_layout x)
+layout x = middleware - config (set_namespace loli_config loli_layout x)
 
 views :: String -&gt; Unit
-views x = middleware $ config (set_namespace loli_config loli_views x)
+views x = middleware - config (set_namespace loli_config loli_views x)
 
 router :: Router -&gt; Unit
 router = set_router &gt; update
@@ -49,7 +49,7 @@ mime :: String -&gt; String -&gt; Unit
 mime k v = add_mime k v .update
 
 public :: Maybe String -&gt; [String] -&gt; Unit
-public r xs = middleware $ static r xs
+public r xs = middleware - static r xs
 
 io :: (MonadIO m) =&gt; IO a -&gt; m a
 io = liftIO</diff>
      <filename>src/Network/Loli/DSL.hs</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@ import Network.Loli.Middleware.LoliRouter ()
 import Network.Loli.Middleware.UserMime
 import Network.Loli.Type
 import Network.Loli.Utils
-import Prelude hiding ((.), (/), (&gt;), (^))
+import Prelude hiding ((.), (/), (&gt;), (^), (-))
 
 run_app :: AppUnit -&gt; Application
 run_app unit = \env -&gt; runReaderT unit env .flip execStateT def {status = 200}
@@ -41,7 +41,7 @@ add_route_config r s = let xs = s.routes in s {routes = xs.insert_last r}
 add_route :: RequestMethod -&gt; String -&gt; AppUnit -&gt; Unit
 add_route r s u = do
   c &lt;- get ^ current_router
-  update $ add_route_config RouteConfig { route_path = (r, s, u), router = c }
+  update - add_route_config RouteConfig { route_path = (r, s, u), router = c }
 
 set_router :: Router -&gt; Loli -&gt; Loli
 set_router r x = x { current_router = r }</diff>
      <filename>src/Network/Loli/Engine.hs</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ import Hack
 import Hack.Contrib.Utils
 import Hack.Contrib.Utils hiding (get, put)
 import MPS
-import Prelude hiding ((.), (&gt;), (/))
+import Prelude hiding ((.), (&gt;), (/), (-))
 import Data.ByteString.UTF8 (fromString)
 
 
@@ -56,12 +56,12 @@ parse_params t s =
           let token_length = template_tokens.length
               location     = &quot;/&quot; / url_tokens.take token_length .join &quot;/&quot;
           in
-          Just $ (location, rs.catMaybes.catMaybes)
+          Just - (location, rs.catMaybes.catMaybes)
         else Nothing
   
   where
     capture x y 
-      | x.starts_with &quot;:&quot; = Just $ Just (x.tail, y)
+      | x.starts_with &quot;:&quot; = Just - Just (x.tail, y)
       | x == y = Just Nothing
       | otherwise = Nothing
       </diff>
      <filename>src/Network/Loli/Middleware/LoliRouter.hs</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ import Hack
 import Hack.Contrib.Response
 import Hack.Contrib.Utils
 import MPS.Light
-import Prelude hiding ((.))
+import Prelude hiding ((.), (-))
 
 
 user_mime :: [(String, String)] -&gt; Middleware
@@ -13,5 +13,5 @@ user_mime h app env = do
   r &lt;- app env
   case h.only_fst.find mime &gt;&gt;= flip lookup h of
     Nothing -&gt; return r
-    Just v -&gt; return $ r.set_content_type v
+    Just v -&gt; return - r.set_content_type v
   where mime x = env.path_info.ends_with ('.' : x)</diff>
      <filename>src/Network/Loli/Middleware/UserMime.hs</filename>
    </modified>
    <modified>
      <diff>@@ -12,20 +12,20 @@ import Network.Loli.Template.TextTemplate
 import Network.Loli.Type
 import Network.Loli.Utils
 import Data.Maybe
-import Prelude hiding ((.), (&gt;), (^), (/))
+import Prelude hiding ((.), (&gt;), (^), (-), (/))
 import qualified Control.Monad.State as State
 
 -- simple
 text :: String -&gt; AppUnit
 text x = do
-  update $ set_content_type _TextPlain
-  update $ set_body (x.fromString)
+  update - set_content_type _TextPlain
+  update - set_body (x.fromString)
   render_layout
 
 html :: String -&gt; AppUnit
 html x = do
-  update $ set_content_type _TextHtml
-  update $ set_body (x.fromString)
+  update - set_content_type _TextHtml
+  update - set_body (x.fromString)
   render_layout
 
 -- template
@@ -55,7 +55,7 @@ render_layout = do
       Nothing -&gt; return ()
       Just layout_template -&gt; do
         s &lt;- State.get ^ body ^ toString
-        local (set_namespace loli_partials loli_layout_content s) $ do
+        local (set_namespace loli_partials loli_layout_content s) - do
           render (text_template layout_template) 
             &gt;&gt;= fromString &gt; set_body &gt; update
 </diff>
      <filename>src/Network/Loli/Template.hs</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ import Control.Arrow ((***))
 import Data.ByteString.Lazy.UTF8
 import MPS
 import Network.Loli.Type
-import Prelude hiding ((.), (&gt;), (^), (/))
+import Prelude hiding ((.), (&gt;), (^), (-), (/))
 import Text.Template hiding (Context, Template, template)
 import qualified Text.Template as T
 </diff>
      <filename>src/Network/Loli/Template/TextTemplate.hs</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ module Network.Loli.Utils where
 import Control.Monad.State
 import Hack
 import MPS.Light
-import Prelude hiding ((.), (/), (&gt;), (^))
+import Prelude hiding ((.), (/), (&gt;), (^), (-))
 import Data.ByteString.UTF8 (fromString, toString)
 
 namespace :: String -&gt; Env -&gt; [(String, String)]</diff>
      <filename>src/Network/Loli/Utils.hs</filename>
    </modified>
    <modified>
      <diff>@@ -80,7 +80,7 @@ list = ls db ^ rsort &gt;&gt;= mapM read
 read :: String -&gt; IO Paste
 read x =  do
   src &lt;- readFile (db / x)
-  return $ def {no, lang, user, src}
+  return - def {no, lang, user, src}
   where
     no = x.split sep .first .P.read :: Int
     lang = x.split &quot;\\.&quot; .last
@@ -109,22 +109,22 @@ link x = &quot;/&quot; ++ x.paste_id
 
 -- Controller
 main :: IO ()
-main = runWithConfig def {port = 5000}  $ loli $ do
+main = runWithConfig def {port = 5000}  - loli - do
 
   public (Just &quot;public&quot;) [&quot;/css&quot;, &quot;/js&quot;]
   
   middleware lambda
-  middleware $ content_type _TextHtml
+  middleware - content_type _TextHtml
   
   views &quot;views/loli_paste&quot;
   layout &quot;layout.html&quot;
   
   
-  get &quot;/create&quot; $ do
-    bind &quot;options&quot; options $ do
-      output $ text_template &quot;create.html&quot;
+  get &quot;/create&quot; - do
+    bind &quot;options&quot; options - do
+      output - text_template &quot;create.html&quot;
   
-  get &quot;/:paste&quot; $ do
+  get &quot;/:paste&quot; - do
     name &lt;- captures ^ lookup &quot;paste&quot; ^ fromJust ^ unescape_uri ^ b2u
     if &quot;..&quot; `isInfixOf` name
       then html &quot;no permission&quot;
@@ -135,16 +135,16 @@ main = runWithConfig def {port = 5000}  $ loli $ do
             paste &lt;- read name .io
             raw &lt;- ask ^ params ^ lookup &quot;raw&quot;
             case raw of
-              Just &quot;true&quot; -&gt; no_layout $ text (paste.src)
+              Just &quot;true&quot; -&gt; no_layout - text (paste.src)
               _ -&gt; do
                 context 
                   [ (&quot;paste_id&quot;, paste.paste_id)
                   , (&quot;src&quot;, paste.src.kate (paste.lang.guess_lang))
-                  ] $ output $ text_template &quot;view.html&quot;
+                  ] - output - text_template &quot;view.html&quot;
         
           else html &quot;paste missing&quot;
 
-  post &quot;/&quot; $ do
+  post &quot;/&quot; - do
     form &lt;- ask ^ inputs ^ map_snd unescape_unicode_xml
     let src'  = form.lookup &quot;src&quot;
         user' = form.lookup &quot;user&quot;
@@ -171,21 +171,21 @@ main = runWithConfig def {port = 5000}  $ loli $ do
             no &lt;- ls db .io ^ rsort ^ first ^ get_id ^ (+1)
             paste { no } .create .io
         
-        update $ redirect &quot;/&quot; Nothing
+        update - redirect &quot;/&quot; Nothing
               
   -- default
-  get &quot;/&quot; $ do
+  get &quot;/&quot; - do
     pastes &lt;- list .io ^ take 50
     let rows = pastes.map row .concat
-    bind &quot;rows&quot; rows $ do
-      output $ text_template &quot;list.html&quot;
+    bind &quot;rows&quot; rows - do
+      output - text_template &quot;list.html&quot;
 
 -- View helper
 
 kate :: String -&gt; String -&gt; String
 kate language code = 
   case highlightAs language code of
-    Right result -&gt; renderHtmlFragment $ 
+    Right result -&gt; renderHtmlFragment - 
         formatAsXHtml [] language result
     Left  _    -&gt; &quot;&lt;pre&gt;&lt;code&gt;&quot; ++ code ++ &quot;&lt;/code&gt;&lt;/pre&gt;&quot;
 </diff>
      <filename>src/Test/LoliPaste.hs</filename>
    </modified>
    <modified>
      <diff>@@ -10,21 +10,21 @@ import Network.Loli.Template.TextTemplate
 import Network.Loli.Utils
 import Network.Loli.Middleware.LoliRouter
 import Data.Maybe
-import MPS ((^))
-import Prelude hiding ((^))
+import MPS ((^), (-))
+import Prelude hiding ((^), (-))
 import Hack.Contrib.Request
 
 -- default on port 3000
 
 main :: IO ()
-main = run 3000 . loli $ do
+main = run 3000 . loli - do
   
     middleware lambda
     
     before return
     after return
 
-    get &quot;/bench&quot;     $ do
+    get &quot;/bench&quot; - do
       name &lt;- ask ^ params ^ lookup &quot;name&quot; ^ fromMaybe &quot;nobody&quot;
       html (&quot;&lt;h1&gt;&quot; ++ name ++ &quot;&lt;/h1&gt;&quot;)
 
@@ -37,57 +37,57 @@ main = run 3000 . loli $ do
     get &quot;/debug&quot;    (text . show =&lt;&lt; ask)
   
     -- io
-    get &quot;/cabal&quot;    $ text =&lt;&lt; io (readFile &quot;loli.cabal&quot;)
+    get &quot;/cabal&quot;    - text =&lt;&lt; io (readFile &quot;loli.cabal&quot;)
 
     -- route captures
-    get &quot;/say/:user/:message&quot; $ do
+    get &quot;/say/:user/:message&quot; - do
       text . show =&lt;&lt; captures
 
     -- html output
     get &quot;/html&quot;     (html &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;loli power!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;)
 
     -- template
-    get &quot;/hi/:user&quot;        $ output (text_template &quot;hello.html&quot;)
+    get &quot;/hi/:user&quot; - output (text_template &quot;hello.html&quot;)
 
     -- manually tweak the reponse body
-    get &quot;/hi-html/:user&quot; $ do
-      update $ set_content_type &quot;text/html&quot;
-      output $ text_template &quot;hello.html&quot;
+    get &quot;/hi-html/:user&quot; - do
+      update - set_content_type &quot;text/html&quot;
+      output - text_template &quot;hello.html&quot;
 
     -- add local binding
-    get &quot;/local-binding&quot; $ do
-      bind &quot;user&quot; &quot;alice&quot; $ output (text_template &quot;hello.html&quot;)
+    get &quot;/local-binding&quot; - do
+      bind &quot;user&quot; &quot;alice&quot; - output (text_template &quot;hello.html&quot;)
     
   
     -- batched local locals
-    get &quot;/batched-local-binding&quot; $ do
-      context [(&quot;user&quot;, &quot;alice&quot;), (&quot;password&quot;, &quot;foo&quot;)] $ 
+    get &quot;/batched-local-binding&quot; - do
+      context [(&quot;user&quot;, &quot;alice&quot;), (&quot;password&quot;, &quot;foo&quot;)] - 
         text .show =&lt;&lt; locals
   
-    get &quot;/const-template&quot; $ do
+    get &quot;/const-template&quot; - do
       output (const_template &quot;const-string&quot;)
   
-    get &quot;/partial-template&quot; $ do
-      partial &quot;user&quot; (const_template &quot;const-user&quot;) $ do
+    get &quot;/partial-template&quot; - do
+      partial &quot;user&quot; (const_template &quot;const-user&quot;) - do
         text . show =&lt;&lt; template_locals
   
-    get &quot;/partial-context&quot; $ do
+    get &quot;/partial-context&quot; - do
       partials 
         [ (&quot;user&quot;, const_template &quot;alex&quot;)
         , (&quot;password&quot;, const_template &quot;foo&quot;)
-        ] $ do
+        ] - do
           output (text_template &quot;hello.html&quot;)
   
-    get &quot;/with-layout&quot; $ do
-      with_layout &quot;layout.html&quot; $ do
+    get &quot;/with-layout&quot; - do
+      with_layout &quot;layout.html&quot; - do
         text &quot;layout?&quot;
   
-    get &quot;/without-layout&quot; $ do
-      no_layout $ do
+    get &quot;/without-layout&quot; - do
+      no_layout - do
         text &quot;no-layout&quot;
   
     -- default
-    get &quot;/&quot;         $ do
+    get &quot;/&quot; - do
       io . print =&lt;&lt; ask ^ url
       text . show =&lt;&lt; ask
 </diff>
      <filename>src/Test/Test.hs</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
 import Network.Loli
 import Hack.Handler.Happstack
 
-main = run . loli $ get &quot;/&quot; (text &quot;loli power&quot;)
\ No newline at end of file
+main = run . loli - get &quot;/&quot; (text &quot;loli power&quot;)
\ No newline at end of file</diff>
      <filename>src/Test/myapp.hs</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3628896d7d8bc688f1b00c862840701ec0682921</id>
    </parent>
  </parents>
  <author>
    <name>jinjing</name>
    <email>nfjinjing@gmail.com</email>
  </author>
  <url>http://github.com/nfjinjing/loli/commit/438ec820288c92d07fd1b7ed85ed673af5dfb543</url>
  <id>438ec820288c92d07fd1b7ed85ed673af5dfb543</id>
  <committed-date>2009-08-16T08:54:17-07:00</committed-date>
  <authored-date>2009-08-16T08:54:17-07:00</authored-date>
  <message>no $ noise</message>
  <tree>5a60debad10f15c27480d9ebcadc10bebf96ccba</tree>
  <committer>
    <name>jinjing</name>
    <email>nfjinjing@gmail.com</email>
  </committer>
</commit>
