We could define a convenient function div, for example, with
div : [Attribute] - > [CssProperty] -> [Html] -> Html
div = node "div"
that would let us say "div [] [] [text "Hello world"]" instead of "node "div" [] [] [text "Hello world"]". Of course, this doesn't fix your problem with the empty brackets. This can be fixed with something like:
Comments
It's easy to use partial application to get rid of that problem: the type of the function node is:
We could define a convenient function div, for example, with that would let us say "div [] [] [text "Hello world"]" instead of "node "div" [] [] [text "Hello world"]". Of course, this doesn't fix your problem with the empty brackets. This can be fixed with something like: letting us do "bareDiv [text "Hello world"]"