A simple term rewriting engine written in Haskell