Commit 75c7cda2 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

ghc-pkg: Express return-method in terms of pure

parent d990b5f6
......@@ -1515,11 +1515,11 @@ instance Functor Validate where
fmap = liftM
instance Applicative Validate where
pure = return
pure a = V $ pure (a, [], [])
(<*>) = ap
instance Monad Validate where
return a = V $ return (a, [], [])
return = pure
m >>= k = V $ do
(a, es, ws) <- runValidate m
(b, es', ws') <- runValidate (k a)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment