diff options
author | Austin Seipp <austin@well-typed.com> | 2013-09-11 18:46:54 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2013-09-11 18:47:15 -0500 |
commit | b20cf4ecbf244f091f4084c11ae2350d248ce6ef (patch) | |
tree | d595c6c632773bb4110468c23467f0b339096538 /utils/ghc-pkg | |
parent | 1ef941a82eafb8f22c19e2643685679d2454c24a (diff) | |
download | haskell-b20cf4ecbf244f091f4084c11ae2350d248ce6ef.tar.gz |
Fix AMP warnings.
Authored-by: David Luposchainsky <dluposchainsky@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'utils/ghc-pkg')
-rw-r--r-- | utils/ghc-pkg/Main.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index 41ed265f4b..30acbe2eb8 100644 --- a/utils/ghc-pkg/Main.hs +++ b/utils/ghc-pkg/Main.hs @@ -34,6 +34,7 @@ import Data.Maybe import Data.Char ( isSpace, toLower ) import Data.Ord (comparing) +import Control.Applicative (Applicative(..)) import Control.Monad import System.Directory ( doesDirectoryExist, getDirectoryContents, doesFileExist, renameFile, removeFile, @@ -1303,6 +1304,13 @@ type ValidateWarning = String newtype Validate a = V { runValidate :: IO (a, [ValidateError],[ValidateWarning]) } +instance Functor Validate where + fmap = liftM + +instance Applicative Validate where + pure = return + (<*>) = ap + instance Monad Validate where return a = V $ return (a, [], []) m >>= k = V $ do |