xhb 0.5.2012.3.26 → 0.5.2012.11.23
raw patch · 2 files changed
+4/−4 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Graphics.XHB: emptyValueParam :: Bits a => ValueParam a
+ Graphics.XHB: emptyValueParam :: Num a => ValueParam a
- Graphics.XHB: toMask :: (Bits b, BitEnum e) => [e] -> b
+ Graphics.XHB: toMask :: (Bits b, Num b, BitEnum e) => [e] -> b
- Graphics.XHB: toValueParam :: (Bits a, BitEnum e) => [(e, Word32)] -> ValueParam a
+ Graphics.XHB: toValueParam :: (Bits a, Num a, BitEnum e) => [(e, Word32)] -> ValueParam a
Files
- Graphics/XHB/Shared.hs +3/−3
- xhb.cabal +1/−1
@@ -82,13 +82,13 @@ where go i | x `testBit` i = return $ fromBit i | otherwise = Nothing -toMask :: (Bits b, BitEnum e) => [e] -> b+toMask :: (Bits b, Num b, BitEnum e) => [e] -> b toMask = foldl' (.|.) 0 . map (bit . toBit) data ValueParam a = VP a [Word32] -toValueParam :: (Bits a, BitEnum e) => [(e,Word32)] -> ValueParam a+toValueParam :: (Bits a, Num a, BitEnum e) => [(e,Word32)] -> ValueParam a toValueParam xs = let (es,ws) = unzip $ L.sortBy (compare `on` toBit . fst) xs in VP (toMask es) ws@@ -98,7 +98,7 @@ let es = fromMask x in assert (length es == length ws) $ zip es ws -emptyValueParam :: Bits a => ValueParam a+emptyValueParam :: Num a => ValueParam a emptyValueParam = VP 0 [] instance (Bits a, Show a) => Show (ValueParam a) where
xhb.cabal view
@@ -1,5 +1,5 @@ Name: xhb-Version: 0.5.2012.3.26+Version: 0.5.2012.11.23 Cabal-Version: >= 1.2.3 Synopsis: X Haskell Bindings Description: