4 ms·
As a front end dev, this is great. Now I can get back to my true job responsibility, which is writing HTML files in pure Haskell.
by GlenTheEskimo 2y ago
As a front end dev, this is great. Now I can get back to my true job responsibility, which is writing HTML files in pure Haskell.
- SavageBeast 2y agoI just shot beer through my nose LOL-ing when I read this.
- kccqzy 2y agoNot a bad idea actually. I had used the lucid library to do just that. It was intuitive and easy to read.
- thih9 2y agoSample syntax: table_ (tr_ (td_ (p_ "Hello, World!"))) More complex: table_ [rows_ "2"] (tr_ (do td_ [class_ "top",colspan_ "2",style_ "color:red"] (p_ "Hello, attributes!") td_ "yay!")) Source: https://hackage.haskell.org/package/lucid https://hackage.haskell.org/package/lucid
- deleted 2y ago[deleted]
- masklinn 2y agoYeah Haskell is far from the worst langage to write a tree of elements in. That is essentially what Elm proposes and it works fine.
- tannhaeuser 2y agoHTML isn't a "tree of elements" though; it's about content token sequences described by regular languages where the symbols can also represent nested markup. The regular content model stuff is what drives SGML/HTML tag omission/inference and is a major feature of markup languages as a text format compared to primitive co-inductive expression syntax a la s-expr and co.
- weego 2y agoYou can already write your Javascript in Scala so the game is afoot.