#5419: integer-gmp no longer exports S# and J#
-----------------------------------+----------------------------------------
    Reporter:  mikhail.vorozhtsov  |        Owner:              
        Type:  bug                 |       Status:  new         
    Priority:  normal              |    Milestone:              
   Component:  libraries (other)   |      Version:  7.3         
    Keywords:                      |     Testcase:              
   Blockedby:                      |   Difficulty:              
          Os:  Unknown/Multiple    |     Blocking:              
Architecture:  Unknown/Multiple    |      Failure:  None/Unknown
-----------------------------------+----------------------------------------

Comment(by tibbe):

 Here's and example use of the internals:

 https://github.com/bos/text/blob/master/Data/Text/Lazy/Builder/Int.hs#L95

 Note that the `Integer` value being pretty-printed here typically won't be
 known statically, so optimizing constants won't help here.

 Hashing `Integer`s is another important case. We can hash an `Integer`
 much faster if we can first hash the `Int#` component and then zip over
 the `ByteArray#`.

 We could create a projection function of type `Integer -> (Int#,
 ByteArray#)` which would be a simple constructor unwrapping in integer-gmp
 and some kind of conversion in integer-simple.

 Note that packages can access `S#` directly but still be portable to other
 integer implementation by using CPP.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5419#comment:7>
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

Reply via email to