A very basic Haskell parsing library written in an imperative style