Since mid-January, I’ve been running nightly builds of GHC on my Mac Pro for 10.8.x, 64-bit. I’ve decided to make these results publically downloadable here: http://ghc.newartisans.com. The installer tarballs are in dist, while the fulltest and nofib logs are in logs. According to Jenkins this build takes 8h15m minutes, so I figured this might save others some CPU [...]
In this tutorial I would like to talk all about continuations, to attempt to demystify this rather simple concept somewhat. For it’s not so much that continuations are difficult, but that the ways in which they’re used can get complex pretty fast. In essence, a continuation is a function which represents the next block of code to be executed. Take [...]
Problem 1: The source of exceptions is obscured
main = getArgs >>= readFile . head >>= print . length Even though length is a pure function, this is where the I/O will happen (lazily), which means that is where any exceptions relating to I/O will [...]
I think one reason I’ve been avoiding posting to my blog lately is the time commitment of writing something of decent length. To get over this hump, I’m going to shift my focus to writing smaller little discoveries of things I find during my researches into Haskell and technology. Let’s see how that goes. [...]
The following is the first in a series of articles I hope to write as a gentle introduction to Edward Kmett’s excellent lens library. Control.Lens provides a composable way to access and modify sub-parts of data structures (where by modify I mean: return a new copy with that part changed). In this introduction I won’t be talking about the [...]
I have found that arrows in Haskell are far simpler than they might appear based on the literature. They are simply abstractions of functions. To see how this is practically useful, consider that you have a bunch of functions you want to compose, where some of them are pure and some are monadic. For example, f :: a -> [...]