The moe package

[Tags:bsd3, library]

a purely functional html combinator with a clean syntax


[Skip to Readme]

Properties

Versions 2009.8.23, 2009.8.26, 2009.8.28, 2009.9.1, 2009.9.1.1, 2009.9.2, 2009.9.16, 2009.11.3, 2010.9.29, 2010.9.29.1, 2010.9.29.2, 2011.6.11, 2011.6.14, 2013.6.22, 2014.4.14, 2014.11.17, 2015.5.4
Change log changelog.md
Dependencies base (==4.*), bytestring, data-default, dlist, mps (>=2009.9.18), mtl, utf8-string [details]
License BSD3
Author Jinjing Wang
Maintainer Jinjing Wang <nfjinjing@gmail.com>
Stability Unknown
Category Web
Home page http://github.com/nfjinjing/moe
Uploaded Wed Sep 29 12:34:35 UTC 2010 by JinjingWang
Distributions NixOS:2015.5.4
Downloads 2558 total (49 in the last 30 days)
Votes
0 []
Status Docs not available [build log]
All reported builds failed as of 2015-11-23 [all 5 reports]

Modules

  • Text
    • HTML
      • Text.HTML.Moe
        • Text.HTML.Moe.Attribute
        • Backend
          • Text.HTML.Moe.Backend.ByteString
        • DSL
          • Text.HTML.Moe.DSL.HTML5
          • Text.HTML.Moe.DSL.Kawaii
          • Text.HTML.Moe.DSL.Markdown
        • Text.HTML.Moe.Element
        • Text.HTML.Moe.Type
        • Text.HTML.Moe.Utils
      • Text.HTML.Moe2
        • Text.HTML.Moe2.Attribute
        • DSL
          • Text.HTML.Moe2.DSL.HTML5
          • Text.HTML.Moe2.DSL.Kawaii
          • Text.HTML.Moe2.DSL.Markdown
        • Text.HTML.Moe2.Element
        • Text.HTML.Moe2.Type
        • Text.HTML.Moe2.Utils

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for moe

Readme for moe-2010.9.29.1

Moe: html with style

Example

first page

-- test.hs

import Prelude hiding ((/), (-), head, (>), (.), div)
import MPS.Light ((-))
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"] - (/)

    body - do
      div ! [_class "container"] - do
        str "hello world"

main :: IO ()
main = putStrLn test_page

install and run

cabal update
cabal install moe

runghc test.hs

output:

<html>
  <head>
    <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" />
  </head>
  <body>
    <div class="container">
      hello world
    </div>
  </body>
</html>
<br />

luba