miku 2011.6.24 → 2012.1.19
raw patch · 4 files changed
+10/−10 lines, 4 filesdep ~basedep ~hack2dep ~hack2-contrib
Dependency ranges changed: base, hack2, hack2-contrib
Files
- miku.cabal +4/−4
- readme.md +3/−3
- src/Network/Miku/DSL.hs +2/−3
- src/Network/Miku/Engine.hs +1/−0
miku.cabal view
@@ -1,5 +1,5 @@ Name: miku-Version: 2011.6.24+Version: 2012.1.19 Build-type: Simple Synopsis: A minimum web dev DSL in Haskell Description:@@ -17,10 +17,10 @@ data-files: readme.md, changelog.md, Nemesis, known-issues.md library- build-depends: base > 4 && <= 5+ build-depends: base > 4 && <= 99 , data-default- , hack2 >= 2011.6.20- , hack2-contrib >= 2011.6.20+ , hack2 >= 2012.1.19+ , hack2-contrib >= 2012.1.19 , utf8-string , air >= 2011.6.19 , mtl
readme.md view
@@ -7,7 +7,7 @@ {-# LANGUAGE OverloadedStrings #-} import Network.Miku- import Hack2.Handler.HappstackServer+ import Hack2.Handler.SnapServer main = run . miku $ get "/" (text "miku power") @@ -16,7 +16,7 @@ cabal update cabal install miku- cabal install hack2-handler-happstack-server+ cabal install hack2-handler-snap-server -- copy and paste the above example to myapp.hs @@ -40,7 +40,7 @@ import Prelude hiding ((-)) import Network.Miku- import Hack2.Handler.HappstackServer+ import Hack2.Handler.SnapServer main = run . miku - do
src/Network/Miku/DSL.hs view
@@ -17,7 +17,6 @@ import Prelude hiding ((.), (>), (^), (-)) import qualified Control.Monad.State as State import Data.ByteString.Char8 (ByteString)-import qualified Data.ByteString.Lazy.Char8 as Lazy import Air.Data.Record.SimpleLabel hiding (get) @@ -53,12 +52,12 @@ text :: ByteString -> AppMonad text x = do update - set_content_type _TextPlain- update - set_body_bytestring - Lazy.fromChunks [x]+ update - set_body_bytestring - x html :: ByteString -> AppMonad html x = do update - set_content_type _TextHtml- update - set_body_bytestring - Lazy.fromChunks [x]+ update - set_body_bytestring - x captures :: AppMonadT [(ByteString, ByteString)]
src/Network/Miku/Engine.hs view
@@ -64,6 +64,7 @@ parse_params :: ByteString -> ByteString -> Maybe (ByteString, [(ByteString, ByteString)])+parse_params "*" x = Just (x, []) parse_params "" "" = Just ("", []) parse_params "" _ = Nothing parse_params "/" "" = Nothing