Pouring.scala translated into Haskell