Differentiater written in Haskell