Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use gi-gtk-declarative #79

cdepillabout opened this issue Nov 13, 2018 · 1 comment

use gi-gtk-declarative #79

cdepillabout opened this issue Nov 13, 2018 · 1 comment


Copy link

@cdepillabout cdepillabout commented Nov 13, 2018

One of the most annoying parts of hacking on Termonad is interacting with the haskell-gi libraries. This is no fault of the libraries in question, they are only a thin wrapper around the underlying GTK libraries.

The underlying GTK libraries are mostly IO-based and procedural. It is hard to come up with good, testable code when relying on those libraries.

It would be nice to use a library that lets us write more high-level declarative code.

One library to look into for this is gi-gtk-declarative:

The goal for making this transition to gi-gtk-declarative would be to make more of the Termonad code testable.

(I guess some sort of FRP-based library might work as well, but I don't know of a good one for the haskell-gi ecosystem.)

Copy link

@owickstrom owickstrom commented Nov 15, 2018

Very cool! Ping me if you have any questions around gi-gtk-declarative, happy to help with that if I can! I don't think I have time to help with this particular implementation, but could answer questions about the library.

By the way, it aims to be complete, but some widgets are really hard to automatically make declarative. Thus, it's not a complete declarative layer over gi-gtk at the moment. As "workaround", I plan on providing building blocks for easily creating declarative wrappers around the imperative APIs (called "Custom Widgets").

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants