Category Archives: Uncategorized

Bowling on a Tardis

> {-# LANGUAGE DoRec #-} > import Control.Monad.Tardis A few months ago, I released the tardis package. I promised a few blog posts about it, but put it off until now. If you haven’t heard of my "tardis" package yet, … Continue reading

Posted in Uncategorized | 1 Comment

My experience with Typed Racket: the negative parts

My experience with Typed Racket A while ago, I began a project to re-implement Racket’s web server library in Typed Racket (TR) by providing type annotations to the existing code. I began by typing the xml collection library, but after … Continue reading

Posted in Uncategorized | 3 Comments

Pipes to Conduits part 8: A comparison

In this series, we started with the simplest of Pipe implementations, and added features one by one until we reached Conduit-like functionality. Today, we’ll strip away the abort and close features not present in Conduit (the former might be considered … Continue reading

Posted in Uncategorized | Leave a comment

Pipes to Conduits part 7: Closing the input end early

Back in part 5, we added the ability to attach arbitrary finalizers to pipes. But when those finalizers actually ran was purely mechanical: when any given pipe finished, it would run all upstream finalizers, and then its own. This behavior … Continue reading

Posted in Uncategorized | Leave a comment

Pipes to Conduits part 6: Leftovers

One important use case of the Conduit library is parsing. In order to perform useful parsing, we need to be able to occasionally consume "too much" input, and then put the "leftovers" back into the input stream, as if they … Continue reading

Posted in Uncategorized | Leave a comment

Pipes to Conduits part 5: Finalizers

Last time we introduced abort recovery, allowing downstream pipes to recover from an abort. We were able to write the recover combinator, which could attach a recovery pipe to any other pipe. Today, we’ll look at a different aspect of … Continue reading

Posted in Uncategorized | Leave a comment

Pipes to Conduits part 4: Recovering from Abort

Last time, we introduced the abort primitive, which restored the power to write pipes a la Control.Pipe. However, the power for upstream pipes to force those downstream to abort is perhaps too much. This time, we’re going to give downstream … Continue reading

Posted in Uncategorized | Leave a comment