failing to install on ghc 7.8.2
cabal 1.20.0.0, cabal-install 1.20.0.1
I may be doing something wrong, I'm not super familiar with the Haskell ecosystem yet. But I'm trying to run "cabal install hamtmap" in a sandbox and it's failing to build.
Here's my installation log, hamtmap-0.3.log
Configuring hamtmap-0.3... Building hamtmap-0.3... Preprocessing library hamtmap-0.3... [1 of 2] Compiling Data.BitUtil ( Data/BitUtil.hs, dist/dist-sandbox-fc7d44be/build/Data/BitUtil.o )
Data/BitUtil.hs:17:20:
Could not deduce (Num t) arising from the literal ‘1’
from the context (Bits t, Integral a)
bound by the type signature for
toBitmap :: (Bits t, Integral a) => a -> t
at Data/BitUtil.hs:16:13-42
Possible fix:
add (Num t) to the context of
the type signature for toBitmap :: (Bits t, Integral a) => a -> t
In the first argument of ‘shiftL’, namely ‘1’
In the expression: 1 shiftL fromIntegral subHash
In an equation for ‘toBitmap’:
toBitmap subHash = 1 shiftL fromIntegral subHash
Data/BitUtil.hs:20:26:
Could not deduce (Num a) arising from a use of ‘loop’
from the context (Bits a, Num b)
bound by the type signature for
bitmapToIndices :: (Bits a, Num b) => a -> [b]
at Data/BitUtil.hs:19:20-46
Possible fix:
add (Num a) to the context of
the type signature for
bitmapToIndices :: (Bits a, Num b) => a -> [b]
In the expression: loop 0 bitmap
In an equation for ‘bitmapToIndices’:
bitmapToIndices bitmap
= loop 0 bitmap
where
loop _ 0 = []
loop 32 _ = []
loop ix bitmap
| bitmap .&. 1 == 0 = loop (ix + 1) (bitmap shiftR 1)
| otherwise = ix : (loop (ix + 1) (bitmap shiftR 1))
Data/BitUtil.hs:27:45:
Could not deduce (Num a) arising from the literal ‘1’
from the context (Bits a)
bound by the type signature for
indicesToBitmap :: Bits a => [Int] -> a
at Data/BitUtil.hs:26:20-41
Possible fix:
add (Num a) to the context of
the type signature for indicesToBitmap :: Bits a => [Int] -> a
In the first argument of ‘shiftL’, namely ‘1’
In the second argument of ‘(.|.)’, namely ‘(1 shiftL ix)’
In the expression: bm .|. (1 shiftL ix)
Data/BitUtil.hs:36:11: Could not deduce (Num a) arising from the literal ‘0’ from the context (Bits a, Integral b) bound by the type signature for bitCount8 :: (Bits a, Integral b) => a -> b at Data/BitUtil.hs:35:14-43 Possible fix: add (Num a) to the context of the type signature for bitCount8 :: (Bits a, Integral b) => a -> b In the pattern: 0 In an equation for ‘bitCount8’: bitCount8 0 = 0