ndmitchell / debug

Haskell library for debugging
BSD 3-Clause "New" or "Revised" License
122 stars 7 forks source link

Elm frontend #53

Closed pepeiborra closed 6 years ago

pepeiborra commented 6 years ago

Here we go again.

This is a not-so-straight port of debug.js to debug.elm. From there, debug.js is generated with

pepe:~/scratch/debug$ cd elm
pepe:~/scratch/debug/elm$ elm-make Main.elm --output=../html/debug.js

I believe that there are no functional changes other than a minor fix to the generator of the #function-source control. And no DOM manipulation anymore ! This port is highly declarative and, I think, much easier to modify and maintain. I didn't really like the Elm language, but I enjoyed the Elm libraries and the so called architecture. In fact, this rewrite was a lot of fun.

I would recommend merging this over the Purescript rewrite of the DOM frontend. I like Purescript better as a language and I know that it has Elm-like frameworks, but I have run out of time to continue experimenting, and I am rather happy with the Elm rewrite tbh.

TODO

ndmitchell commented 6 years ago

I like it! Code looks readable, and I've confirmed I can generate it locally, so happy to say we are now using Elm for reals.