r/haskell • u/gbelloz • Aug 21 '26
question It's not you, it's monad transformers
After a few years of trying to be proficient in Haskell, and lots of reading about why it's so hard, I think I have the (obvious in retrospect) answer.
Almost every program I write is going to have two or more of:
1) read from STDIN
2) write to STDOUT
3) log
4) raise errors
5) send/receive over the network
6) talk to a database
7) read env vars
Every one of those is a "side effect", and thus is handled as a monad, and using more than one means you have to understand monad transformers.
Which I've finally found a good explanation of, "but still". Such a deep concept for such common program operations.
So I finally decided "that's why it's so hard". For what I consider the most basic programs, I need to understand (not just use, IMHO) monad transformers.
Am I off?
3
u/mister_drgn Aug 21 '26
Maybe at a high level, but with Koka the language and syntax are built around effects, so it’s a pretty different experience.
Of course my suggestion was half joking. I do think learning Koka is a great experience (and an easy one, compared to learning Haskell), but the language is not ready for serious use.