#4102: Bit manipulation built-ins
---------------------------------+------------------------------------------
Reporter: uzytkownik | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 6.16.1
Component: libraries/base | Version: 6.12.2
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by gwicke):
I have created preliminary bindings to GCC's built-in bit operations and
exposed them in a separate typeclass. The current code is browsable at
http://hg.wikidev.net:8000/trie/file/tip/BitsX/ (see Data/Bits/Extras.hs
for the typeclass and instances), but not yet in its own repository or on
hackage.
The C code in package can obviously only be compiled with GCC. The
external calls introduce some overheads and a dependency on libgcc_s,
which can cause issues with GHCi as its built-in linker does not handle
sonames properly.
A faster, more general and robust solution would probably involve the
introduction of new primops.
The same package currently also bundles a module with atomic bit
operations on memory locations (Data.Bits.Atomic), which should probably
be split out to a separate package.
Feedback on the code and suggestions for better locations in the module
hierarchy would be appreciated. I plan to publish this on hackage once
good locations are found.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4102#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs