cleanup of Haskell file comparison fn