I’m working on a rewrite of https://html2elm.obtuse.io and also a couple of new tools where I generate Elm code as output. Writing a code generator which generates nice looking Elm is turning out to be pretty complex even for a subset of Elm. Running elm-format using a port would be ideal for me. Has anyone had success compiling elm-format with GHCJS or other Haskell → JS compilers?
Thanks for the reply @luke!
How enormous are the compiled files? I really want to do this on the client side and not on a server. It’s a dev tool so I’m fine even if the compiled JS is like 1-2MB gzipped.
If compiling to JS is not an option I’ll probably write a formatter which generates somewhat reasonable code and let the user run elm-format when they copy paste the code into their project.