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