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-06 14:24:59 +0000 |
commit | 39337a6d97c853a88fa61d6b12a04eb8c2e5984f (patch) | |
tree | 0dd7051080041ee928429832122b9dd14add302c /compiler/ghci | |
parent | 32973bf3c2f6fe00e01b44a63ac1904080466938 (diff) | |
download | haskell-39337a6d97c853a88fa61d6b12a04eb8c2e5984f.tar.gz |
Remove redundant constraints in the compiler itself, found by -fwarn-redundant-constraints
Diffstat (limited to 'compiler/ghci')
-rw-r--r-- | compiler/ghci/ByteCodeItbls.hs | 6 | ||||
-rw-r--r-- | compiler/ghci/Linker.hs | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/compiler/ghci/ByteCodeItbls.hs b/compiler/ghci/ByteCodeItbls.hs index d6399baf64..872d728992 100644 --- a/compiler/ghci/ByteCodeItbls.hs +++ b/compiler/ghci/ByteCodeItbls.hs @@ -235,12 +235,14 @@ mkJumpToAddr dflags a = case platformArch (targetPlatform dflags) of arch -> panic ("mkJumpToAddr not defined for " ++ show arch) -byte0, byte1, byte2, byte3 :: (Integral w, Bits w) => w -> Word8 +byte0 :: (Integral w) => w -> Word8 byte0 w = fromIntegral w + +byte1, byte2, byte3, byte4, byte5, byte6, byte7 + :: (Integral w, Bits w) => w -> Word8 byte1 w = fromIntegral (w `shiftR` 8) byte2 w = fromIntegral (w `shiftR` 16) byte3 w = fromIntegral (w `shiftR` 24) -byte4, byte5, byte6, byte7 :: (Integral w, Bits w) => w -> Word8 byte4 w = fromIntegral (w `shiftR` 32) byte5 w = fromIntegral (w `shiftR` 40) byte6 w = fromIntegral (w `shiftR` 48) diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs index 91706da7cb..5a32d0761d 100644 --- a/compiler/ghci/Linker.hs +++ b/compiler/ghci/Linker.hs @@ -199,7 +199,7 @@ linkDependencies hsc_env pls span needed_mods = do -- | Temporarily extend the linker state. -withExtendedLinkEnv :: (MonadIO m, ExceptionMonad m) => +withExtendedLinkEnv :: (ExceptionMonad m) => [(Name,HValue)] -> m a -> m a withExtendedLinkEnv new_env action = gbracket (liftIO $ extendLinkEnv new_env) |