Fix haskell-styled type definitions of monad functions