Lightweight higher-order rewriting in Haskell