diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-01-05 16:57:01 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-01-05 17:00:05 +0000 |
commit | 0b3f53fb8d86278ead96ea08bedd8990d3256dc4 (patch) | |
tree | d3ae62380f95ab44b711a4d4a7b8eb9630746069 /compiler/main/GHC.hs | |
parent | d6c8da69ed75f0a046bfcf779e71a4ecd2dab106 (diff) | |
download | haskell-wip/redundant-constraints.tar.gz |
Remove redundant constraints in the compiler itself, found by -fwarn-redundant-constraintswip/redundant-constraints
Diffstat (limited to 'compiler/main/GHC.hs')
-rw-r--r-- | compiler/main/GHC.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 6462aa648a..28e4c0a9dd 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -345,7 +345,7 @@ import Prelude hiding (init) -- Unless you want to handle exceptions yourself, you should wrap this around -- the top level of your program. The default handlers output the error -- message(s) to stderr and exit cleanly. -defaultErrorHandler :: (ExceptionMonad m, MonadIO m) +defaultErrorHandler :: (ExceptionMonad m) => FatalMessager -> FlushOut -> m a -> m a defaultErrorHandler fm (FlushOut flushOut) inner = -- top-level exception handler: any unrecognised exception is a compiler bug. @@ -386,7 +386,7 @@ defaultErrorHandler fm (FlushOut flushOut) inner = -- a GHC run. This is separate from 'defaultErrorHandler', because you might -- want to override the error handling, but still get the ordinary cleanup -- behaviour. -defaultCleanupHandler :: (ExceptionMonad m, MonadIO m) => +defaultCleanupHandler :: (ExceptionMonad m) => DynFlags -> m a -> m a defaultCleanupHandler dflags inner = -- make sure we clean up after ourselves @@ -432,7 +432,11 @@ runGhc mb_top_dir ghc = do -- to this function will create a new session which should not be shared among -- several threads. -runGhcT :: (ExceptionMonad m, Functor m, MonadIO m) => +#if __GLASGOW_HASKELL < 710 +runGhcT :: (ExceptionMonad m, Functor m) => +#else +runGhcT :: (ExceptionMonad m) => +#endif Maybe FilePath -- ^ See argument to 'initGhcMonad'. -> GhcT m a -- ^ The action to perform. -> m a |