This feels like cargo culting. The point of IO isn't the RealWorld stuff (that's an implementation technique, and not even really true these days as IO offers all sorts of other facilities), the point is that it's a way to get the language's type system to help you distinguish between accidental control flow and essential control flow ( <a href="http://www.lihaoyi.com/post/WhatsFunctionalProgrammingAllAbout.html" rel="nofollow">http://www.lihaoyi.com/post/WhatsFunctionalProgrammingAllAbo...</a> ). Without the type system it's a lot of ceremony for no benefit.
Good post, and clever technique.<p>Site feedback: That blue bar at the top make it looks like your page hasn't loaded. If I want to see how far I've read, I will just look to the right side at the scrollbar.
Aha, nice! I have wondered about doing something similar before.<p>As part of a module on XML for my MSc I decided to go maximum overkill, and created in XSLT a simple key-value lookup, a breadth-first node search algorithm, and a simple TAP-based test suite to make sure it all worked properly. Almost looked at seeing how much of the Functional Data Structures book I could cram into XSLT for my dissertation before choosing something a little less ambitious.
That is a good writeup, a fun read! I love Haskell but I tend to use a small subset of the language. This means that I am effective when working in my own Haskell projects but reading and understanding other people’s code takes time and effort.