09:09 am, 26 Mar 07
whim
xmonad : a lightweight X11 window manager, written in Haskell. I think these "[x], but written in [yr favorite programming language]" projects aren't especially news-worthy (or for that matter attention-worthy), but it's neat to see it's based on / influenced by dwm: because, as yet another learning-Haskell project, I too wrote a window manager in Haskell that was based on dwm.
Mine didn't do too much. I don't think I posted about it here 'cause I was a little ashamed of doing it; it's not like the world especially needs another window manager.
(Haskell geeks only for this part:) That project mostly made me conclude that IO-intensive apps like window managers are sort of a pain. Their code (which uses a state monad to track the state of the world) has chunks of line after line of "
Mine didn't do too much. I don't think I posted about it here 'cause I was a little ashamed of doing it; it's not like the world especially needs another window manager.
(Haskell geeks only for this part:) That project mostly made me conclude that IO-intensive apps like window managers are sort of a pain. Their code (which uses a state monad to track the state of the world) has chunks of line after line of "
gets
"es. In one sense it doesn't really matter and is just more typing to get things done, but in another sense so is Java.
gets
is what bothers you, that could have been rewritten with oneget
. You'd still need the selectors on the XState, though, and that has little to do with the code being monadic.Which looks like what you want, doesn't it? The drawback is that this "xstate" won't be visible in
where
functions here. The same applies to bindings fromgets
, of course.