theam / haskell-do

:pencil2: :bar_chart: - The Haskell code editor focused on interactive development.
Apache License 2.0
351 stars 31 forks source link

Port GUI to Miso #109

Open NickSeagull opened 7 years ago

NickSeagull commented 7 years ago

Some time ago I discovered that @dmjio released Miso, a great GUI framework based on Elm.

Right now we are relying on our Ulmus module, that emulates the Elm architecture. There are some weird bugs with widgets not rendering properly, and also, talking about widgets, we have to explicitly thread them in a weird way, so its also not that straightforward. Maybe rewriting the GUI in Miso might help?

The most important thing would be writing a transient-miso adapter, that allows running startApp in the Cloud monad, allowing to send Action s to the core from the front.

I made an example website, hosted here . Source code can be found at this repository.

NickSeagull commented 7 years ago

Pinging @mdibaiee , what do you think about this? I might start working in the adapter.

mdibaiee commented 7 years ago

@NickSeagull this is definitely cool! :+1: I personally am in favor of switching to an already developed and tested framework like Miso. Let me know of your progress and anywhere I might be able to help

Would also help with: #84


Now with this going in progress, should I wait for it to finish before fixing #104 or should I proceed? If you think it's going to take a long time, then we'd better have #104 fixed as it does annoy new users 🤔

dmjio commented 7 years ago

@NickSeagull, @mdibaiee, extremely excited about this effort, would love to be of help in any way.

NickSeagull commented 7 years ago

Definitely #104 is worth fixing @mdibaiee , its quite annoying for newcomers and for current users too (I have to fix the error using another editor and then come back)

ocramz commented 6 years ago

@NickSeagull @mdibaiee @dmjio I've started looking into how to address this ticket, but I have a general question:

ocramz commented 6 years ago

Also, what's the role of transient?

NickSeagull commented 6 years ago

@ocramz the current architecture of Haskell.do is basically the Elm architecture. There is a big update function located in HaskellDo.State which dispatches the HaskellDo.Action message to each one of the components, which at the same time have their update function, located in HaskellDo.<component>.State. It also handles errors

The Compilation component basically is used to setup the project and write files. The compilation itself is done in the big HaskellDo.State file (which shouldnt be done there).

We don't use GHC directly, and rather leave all the hard work to stack, as it is the easiest way

ocramz commented 6 years ago

Right, thanks!

NickSeagull commented 6 years ago

Also, about transient, it allows isomorphic programming, forgot to mention it @ocramz 😄