Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Conditionally import CUInt constructor on GHC >= 7.2

  • Loading branch information...
commit 7c19a6d9e5726eb983d14114f5a9b88e498b6351 1 parent 9a5cb67
@tibbe authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 Data/HashMap/PopCount.hs
View
7 Data/HashMap/PopCount.hs
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.