Port frontend to Haskell, using Miso and the GHC Wasm backend #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is very much a proof of concept. Running
nix shell gitlab:haskell-wasm/ghc-wasm-meta?rev=56dfe2478cae35ded335261c854bb8b2a5e7f4d2#all_9_10 -c ./run-wasm.sh
will run a basic web server with a test playground copied fromScratch.elm
. We have not yet hooked this up to the Monpad backend, or removed most of the redundant Elm stuff. The most important file,Frontend.hs
is still a total mess, including some commented-out Elm code for things which haven't been ported yet, and there are also still some TODOs inmonpad.cabal
. We'll want to fix up the initial commit before merging, and maybe separate out some changes like creating themonpad-core
library.I'm pausing work on this for now while waiting for the Wasm backend and its ecosystem to mature further, e.g. we'll need network support for websockets. I imagine we'll also need to use the threaded runtime in order for Miso's
subs
field to be useful, which will be required for receivingServerUpdate
s.Monpad has no proper tests, so the best way to verify that behaviour is unchanged after the port will be to try the new version with Ewephoria, which utilises almost every feature of the frontend, having inspired many of them.