@Sridhar Ratnakumar I just found https://github.com/seereason/hsx2hs and I wonder whether it couldn't make inline HTML is something like Reflex much more readable
I runs on haskell-source-exts and so it may not support all extensions and HS syntax quirks, but I would have no problem moving few problematic definitions around to get this syntax working
I just find it less cluttered compared to el.., quotes, parens and several operators in normal syntax - but it may be personal taste after all :big_smile:
I can see it being useful for allowing end-users to customize the HTML, but that will require compiling (generated) Haskell code on every change - which is not totaly impractical, as we can ship ghc with neuron. :-)
What we have right now is the ability to override color schemes. It would be nice to also be able to override HTML layout and CSS styles. Since neuron uses reflex-dom for HTML and clay for CSS, a t...
I mean, HS often makes in-language data construction pretty terse, it's just that there still seems to be some space for improvement hsx2hs seems to be quick, so I guess it won't make that much difference
Oh, I didn't really think of possibility of using this as markup in neuron, but that sounds interesting too :big_smile:
@TheMatten In PureScript I ended up making a few infix operators for building up vdom elements from plain functions and records etc. Here's some examples of what it looks like:
@Sridhar Ratnakumar I just found https://github.com/seereason/hsx2hs and I wonder whether it couldn't make inline HTML is something like Reflex much more readable
Random example with hypothetical translation (that parses):
I runs on
haskell-source-exts
and so it may not support all extensions and HS syntax quirks, but I would have no problem moving few problematic definitions around to get this syntax working@TheMatten readable for designers?
I just find it less cluttered compared to
el..
, quotes, parens and several operators in normal syntax - but it may be personal taste after all :big_smile:I can see it being useful for allowing end-users to customize the HTML, but that will require compiling (generated) Haskell code on every change - which is not totaly impractical, as we can ship
ghc
with neuron. :-)I'm of course thinking of https://github.com/srid/neuron/issues/253
I mean, HS often makes in-language data construction pretty terse, it's just that there still seems to be some space for improvement
hsx2hs
seems to be quick, so I guess it won't make that much differenceOh, I didn't really think of possibility of using this as markup in
neuron
, but that sounds interesting too :big_smile:@TheMatten In PureScript I ended up making a few infix operators for building up vdom elements from plain functions and records etc. Here's some examples of what it looks like:
Oh, that's nice
I ended up using qualified do (in PS too):