[Haskell-cafe] Generating valid html

Wojtek Narczyński wojtek at power.com.pl
Thu Nov 13 08:18:50 UTC 2014


On 13.11.2014 02:07, Christopher Reichert wrote:
>
> I'm not sure if it fits all your criteria but BlazeHtml might interest you.
>
> https://hackage.haskell.org/package/blaze-html
>

AFAIR, the objective of blaze is speed, rather than correctness of 
result, so you can do this, for example.

example :: Html
example = do
   H.title $ do
     H.html "rather"
     H.body "strange"
   H.head $ do
     H.h1 "document"

Blaze would be great as a high performance "assembler" for such a DSL.

My question is how to capture (at least some of) the HTML validity rules 
in Haskell types, or classes, or families, or whatever.

-- 
Regards,
Wojtek


More information about the Haskell-Cafe mailing list