I removed the Monad instance for the variant of Html which is serializable with embedded event-handler annotations. This currently means that one has to write things like
H.div $ mconcat
[ H.p $ mconcat ["one", "two", "three"]
, H.p "another paragraph"
, H.p "perhaps a footer"
]
to concatenate Html. I think it would be worth a try to use OverloadedLists to simplify it to
H.div
[ H.p ["one", "two", "three"]
, H.p "another paragraph"
, H.p "perhaps a footer"
]
one possible problem is that this would not play very well with Lucid's Term overloading trick. Moreover, we might be better off anyways by using lucids approach to a HTML EDSL in Haskell; i.e., just use a WriterT Html and overload the different application forms using the Term typeclass.
I removed the
Monadinstance for the variant ofHtmlwhich is serializable with embedded event-handler annotations. This currently means that one has to write things liketo concatenate
Html. I think it would be worth a try to useOverloadedListsto simplify it toone possible problem is that this would not play very well with Lucid's
Termoverloading trick. Moreover, we might be better off anyways by usinglucids approach to a HTML EDSL in Haskell; i.e., just use aWriterT Htmland overload the different application forms using theTermtypeclass.