# Building a GTK Todo App in Haskell with the Elm Architecture

Original title: Making a GTK application in Haskell, part 1

> Hacker News story 49965308 · language: en · submitted 2026-10-05
> Web version: https://zeli.app/story/49965308
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 174 · by [Vosporos](<https://news.ycombinator.com/user?id=Vosporos>) · 💬 53
[original](<https://floreal.tech/blog/2026/making-a-gtk-app-in-haskell-part-1/>) · [HN discussion](<https://news.ycombinator.com/item?id=49965308>)

## Summary

This tutorial walks intermediate Haskellers through creating a todo-list application using Haskell, GTK 4, and the Adwaita library via haskell-gi. It covers setting up an Adwaita application window, modeling state with the Elm Architecture (Model-View-Update), and implementing domain logic for adding and completing tasks. The full project is available on GitHub, and the series continues with more features in part 2.

## Key quote

> This approach was broadly popularised by Elm, and lends itself quite well to taming the imperative nature of the GTK toolkit.

## HN discussion (53 comments)

### [Koshkin](<https://news.ycombinator.com/item?id=49969946>)

> Is a widget a monad? Anyway, the examples in this tutorial are another proof that Haskell is the best imperative language!

### [seba_dos1](<https://news.ycombinator.com/item?id=49966577>)

> Replace `backdrop-filter` on `.backdrop::after` with `filter` on `.backdrop picture` for a free scrolling performance boost.

### [shevy-java](<https://news.ycombinator.com/item?id=49968937>)

> Are people still using gtk?
>
> I started to learn it back then via ruby-gtk2. It was not
>
> the best experience but I learned several key things 
>
> pertaining to widgets and the UI. Then came gtk3; it was
>
> in some ways worse than GTK2, but it also brought a few
>
> improvements such as the partial CSS support. I always
>
> miss that when I use e. g. wxwidget.
>
> Then came GTK4 though and things changed. Tons of old
>
> things broke or no longer worked. Simple things such as
>
> main_window_widget.move(0, 0) for top-left positioning
>
> (I added an alias to this, .top_left in ruby and that
>
> worked nicely); there are work-arounds to get the old
>
> behaviour, but this is just one example of so many more
>
> things that were eliminated. GTK4 is a GNOMEy-toolkit
>
> and GTK5 will be even worse since it will be wayland-only.
>
> "Interacting" with the GNOMEy-GTK devs is a total waste 
>
> of time and I am hardly the only one who had that 
>
> experience. For GNOMEys it may be a useful platform, 
>
> but GTK no longer is a general toolkit really, despite
>
> claims by the current GTK devs otherwise. Why would 
>
> we non-GNOMEys want to keep GTK on life support? There
>
> really needs to be a toolkit that can work in a much
>
> more de-centralized way. Sadly I also don't have a good
>
> idea here, since funding is an issue and GUIs seem to
>
> have taken a huge hit ever since the world wide web
>
> became dominating.

### [pluc](<https://news.ycombinator.com/item?id=49968214>)

> \> import GI.Awd qualified as Adw
>
> please tell me that's a typo

### [birchcove](<https://news.ycombinator.com/item?id=49966839>)

> i've been writing Haskell GUIs for a few years and mostly stick to react-banana or reflex because wiring up gtk-gi signals manually gets messy fast. The Elm architecture pattern here looks clean on paper but I'm curious how you handle async events from the widget tree without ending up in callback hell. Did you end up wrapping all GI callbacks in a channel that feeds into your update loop?

---

## Cite

- Page: https://zeli.app/story/49965308
- Date: 2026-10-05
- Source: floreal.tech (https://floreal.tech/blog/2026/making-a-gtk-app-in-haskell-part-1/)
- Hacker News: https://news.ycombinator.com/item?id=49965308

## Other languages

- zh: https://zeli.app/zh/story/49965308 · markdown: https://zeli.app/zh/story/49965308.md
- ja: https://zeli.app/ja/story/49965308 · markdown: https://zeli.app/ja/story/49965308.md
- ko: https://zeli.app/ko/story/49965308 · markdown: https://zeli.app/ko/story/49965308.md
- de: https://zeli.app/de/story/49965308 · markdown: https://zeli.app/de/story/49965308.md
- es: https://zeli.app/es/story/49965308 · markdown: https://zeli.app/es/story/49965308.md
- ru: https://zeli.app/ru/story/49965308 · markdown: https://zeli.app/ru/story/49965308.md
