summaryrefslogtreecommitdiff
path: root/utils/ghc-pkg
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-10-18 09:18:33 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2015-10-18 09:39:25 +0200
commit75c7cda2a2931bccbb7af5a76278729fccbe4228 (patch)
tree9e662fef05c82bc54a131a8acd3ee7a87296a560 /utils/ghc-pkg
parentd990b5f6ae0cc22f83032e6dee40790ca9c8567a (diff)
downloadhaskell-75c7cda2a2931bccbb7af5a76278729fccbe4228.tar.gz
ghc-pkg: Express return-method in terms of pure
Diffstat (limited to 'utils/ghc-pkg')
-rw-r--r--utils/ghc-pkg/Main.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index 4bc603459a..13e6d6f9c0 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -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)