Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #34 from acowley/develop

Relax mtl dependency; add missing Num constraints.
  • Loading branch information...
commit 09a089ca987f39b4060f1cf8c76fd7bcb3a8ea59 2 parents fcb9642 + e5c14d5
@zhensydow zhensydow authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  OpenCL.cabal
  2. +2 −2 src/Control/Parallel/OpenCL/Types.chs
View
2  OpenCL.cabal
@@ -34,7 +34,7 @@ Library
Build-tools: c2hs
hs-Source-Dirs: src
ghc-options: -Wall
- Build-Depends: base >=4.0 && < 5, bytestring -any, mtl==2.0.*
+ Build-Depends: base >=4.0 && < 5, bytestring -any, mtl>=2
Exposed-Modules:
Control.Parallel.OpenCL
Control.Parallel.OpenCL.Query
View
4 src/Control/Parallel/OpenCL/Types.chs
@@ -711,10 +711,10 @@ binaryFlags m = map toEnum . takeWhile (<= (fromEnum m)) $ [1 `shiftL` n | n <-
testMask :: Bits b => b -> b -> Bool
testMask mask v = (v .&. mask) == v
-bitmaskFromFlags :: (Enum a, Bits b) => [a] -> b
+bitmaskFromFlags :: (Enum a, Bits b, Num b) => [a] -> b
bitmaskFromFlags = foldl' (.|.) 0 . map (fromIntegral . fromEnum)
-bitmaskToFlags :: (Enum a, Bits b) => [a] -> b -> [a]
+bitmaskToFlags :: (Enum a, Bits b, Num b) => [a] -> b -> [a]
bitmaskToFlags xs mask = filter (testMask mask . fromIntegral . fromEnum) xs
bitmaskToDeviceTypes :: CLDeviceType_ -> [CLDeviceType]
Please sign in to comment.
Something went wrong with that request. Please try again.