diff options
| author | Sergei Trofimovich <slyfox@community.haskell.org> | 2013-03-09 21:19:53 +0000 |
|---|---|---|
| committer | Sergei Trofimovich <slyfox@community.haskell.org> | 2013-03-09 21:19:53 +0000 |
| commit | 5b688b635993ca7308221aef852fac84fc102847 (patch) | |
| tree | 3eae5e1fc5d4fad2746bf195ab567e186fcb7ebd /src/runtime | |
| parent | 523633a092b045b65f0d4722e72f118a09c991f2 (diff) | |
ghc-7.6: add missing Num instance for Bits
Fixes the following build failure:
src/runtime/haskell/Data/Binary/IEEE754.lhs:256:17:
Could not deduce (Num a) arising from a use of `mask'
from the context (Bits a)
bound by the type signature for
clamp :: Bits a => BitCount -> a -> a
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/haskell/Data/Binary/IEEE754.lhs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/haskell/Data/Binary/IEEE754.lhs b/src/runtime/haskell/Data/Binary/IEEE754.lhs index af11a5946..96cbefc5a 100644 --- a/src/runtime/haskell/Data/Binary/IEEE754.lhs +++ b/src/runtime/haskell/Data/Binary/IEEE754.lhs @@ -252,7 +252,7 @@ rawToBytes raw = integerToBytes mashed width where in positions above the count. \begin{code} -clamp :: Bits a => BitCount -> a -> a +clamp :: (Num a, Bits a) => BitCount -> a -> a clamp = (.&.) . mask where mask 1 = 1 mask n | n > 1 = (mask (n - 1) `shiftL` 1) + 1 |
