Changed haskell to scala