added Haskell code