The following code is a direct transliteration of the code in the paper into Standard Haskell. Since Haskell currently does not support views, we were forced to apply the source to source translation that is described in Section 2 of the paper.