Permalink
Browse files

Conditionally import CUInt constructor on GHC >= 7.2

  • Loading branch information...
1 parent 9a5cb67 commit 7c19a6d9e5726eb983d14114f5a9b88e498b6351 @tibbe committed Feb 25, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 Data/HashMap/PopCount.hs
View
@@ -1,11 +1,16 @@
-{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE CPP, ForeignFunctionInterface #-}
module Data.HashMap.PopCount
( popCount
) where
import Data.Word (Word)
+
+#if __GLASGOW_HASKELL__ >= 702
+import Foreign.C (CUInt(..))
+#else
import Foreign.C (CUInt)
+#endif
foreign import ccall unsafe "popc.h popcount" c_popcount :: CUInt -> CUInt

0 comments on commit 7c19a6d

Please sign in to comment.