diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2015-10-18 09:18:33 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2015-10-18 09:39:25 +0200 |
commit | 75c7cda2a2931bccbb7af5a76278729fccbe4228 (patch) | |
tree | 9e662fef05c82bc54a131a8acd3ee7a87296a560 /utils/ghc-pkg | |
parent | d990b5f6ae0cc22f83032e6dee40790ca9c8567a (diff) | |
download | haskell-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.hs | 4 |
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) |