[cvs-nhc98] patch applied (hat): Replace the old C version of hat-stack with a new, simple, Haskell version.