exclipy / pdata Goto Github PK
View Code? Open in Web Editor NEWPurely functional, persistent and efficient vector and hash-map data structures for Haskell
License: Other
Purely functional, persistent and efficient vector and hash-map data structures for Haskell
License: Other
Hi,
When I try to "cabal install" hamtmap, I get an error:
[roti@mypc ~]$ cabal install hamtmap
Resolving dependencies...
Configuring hamtmap-0.3...
Building hamtmap-0.3...
Preprocessing library hamtmap-0.3...
[1 of 2] Compiling Data.BitUtil ( Data/BitUtil.hs, dist/build/Data/BitUtil.o )
Data/BitUtil.hs:20:26:
Could not deduce (Eq b) 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:(20,1)-(24,83) Possible fix: add (Eq b) 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))
cabal: Error: some packages failed to install:
hamtmap-0.3 failed during the building phase. The exception was:
ExitFailure 1
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.