moe 2009.11.3 → 2010.9.29
raw patch · 6 files changed
+36/−25 lines, 6 files
Files
- changelog.md +7/−0
- moe.cabal +3/−3
- readme.md +14/−11
- src/Text/HTML/Moe.hs +0/−2
- src/Text/HTML/Moe/Element.hs +4/−1
- src/test.hs +8/−8
changelog.md view
@@ -1,3 +1,10 @@+2010.9.29+---------++### Feature++* new syntax for Moe2+ 2009.9.16 ---------
moe.cabal view
@@ -1,5 +1,5 @@ Name: moe-Version: 2009.11.3+Version: 2010.9.29 Build-type: Simple Synopsis: html with style Description:@@ -8,8 +8,8 @@ License: BSD3 License-file: LICENSE-Author: Wang, Jinjing-Maintainer: Wang, Jinjing <nfjinjing@gmail.com>+Author: Jinjing Wang+Maintainer: Jinjing Wang <nfjinjing@gmail.com> Build-Depends: base Cabal-version: >= 1.2 category: Web
readme.md view
@@ -1,6 +1,6 @@ # Moe: html with style -# Example+## Example first page @@ -8,18 +8,18 @@ import Prelude hiding ((/), (-), head, (>), (.), div) import MPS.Light ((-))- import Text.HTML.Moe+ import Text.HTML.Moe2 test_page :: String test_page = render -- html' - do- head' - do- meta [http_equiv "Content-Type", content "text/html; charset-utf-8"]- title' - str "my title"- link [rel "icon", _type "image/png", href "panda_icon.png"]+ html - do+ head - do+ meta ! [http_equiv "Content-Type", content "text/html; charset-utf-8"] - (/)+ title - str "my title"+ link ! [rel "icon", _type "image/png", href "panda_icon.png"] - (/) - body' - do- div [_class "container"] - do+ body - do+ div ! [_class "container"] - do str "hello world" main :: IO ()@@ -37,11 +37,11 @@ <html> <head>- <meta http-equiv="Content-Type" content="text/html; charset-utf-8"/>+ <meta http-equiv="Content-Type" content="text/html; charset-utf-8" /> <title> my title </title>- <link rel="icon" type="image/png" href="panda_icon.png"/>+ <link rel="icon" type="image/png" href="panda_icon.png" /> </head> <body> <div class="container">@@ -49,4 +49,7 @@ </div> </body> </html>+ +<br /> +
src/Text/HTML/Moe.hs view
@@ -23,8 +23,6 @@ import Data.DList (toList) import Data.List (intersperse) -(/) :: MoeUnit-(/) = return () render :: MoeUnit -> String render = render' > B.unpack
src/Text/HTML/Moe/Element.hs view
@@ -8,7 +8,6 @@ import MPS.Light ((-)) import Data.DList (singleton, toList) - element :: String -> MoeCombinator element x xs u = tell - singleton - def@@ -252,3 +251,7 @@ raw x = tell - singleton - Raw (pack x) _pre x = tell - singleton - Pre (pack - escape x) prim x = tell - singleton - Prim (pack x)+++raw_bytestring x = tell - singleton - Raw x+prim_bytestring x = tell - singleton - Prim x
src/test.hs view
@@ -1,17 +1,17 @@ import Prelude hiding ((/), (-), head, (>), (.), div) import MPS.Light ((-))-import Text.HTML.Moe+import Text.HTML.Moe2 test_page :: String test_page = render -- html' - do- head' - do- meta [http_equiv "Content-Type", content "text/html; charset-utf-8"]- title' - str "my title"- link [rel "icon", _type "image/png", href "panda_icon.png"]+ html - do+ head - do+ meta ! [http_equiv "Content-Type", content "text/html; charset-utf-8"] - (/)+ title - str "my title"+ link ! [rel "icon", _type "image/png", href "panda_icon.png"] - (/) - body' - do- div [_class "container"] - do+ body - do+ div ! [_class "container"] - do str "hello world" main :: IO ()