[GHC] #9835: Add bindings for marshaling to/from mpz_t

GHC ghc-devs at haskell.org
Tue Nov 25 20:36:23 UTC 2014


#9835: Add bindings for marshaling to/from mpz_t
-------------------------------------+-------------------------------------
       Reporter:  dfranke            |                   Owner:
           Type:  feature request    |                  Status:  new
       Priority:  normal             |               Milestone:
      Component:  libraries (other)  |                 Version:  7.8.3
       Keywords:  integer-gmp        |        Operating System:
   Architecture:  Unknown/Multiple   |  Unknown/Multiple
     Difficulty:  Unknown            |         Type of failure:
     Blocked By:                     |  None/Unknown
Related Tickets:                     |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 Please add bindings to allow efficient marshaling between Haskell Integer
 and C mpz_t's, e.g.:

 {{{
   -- Wraps a (struct __mpz_struct*).
   type Mpz = Ptr ()

   toMpz :: Integer -> IO Mpz
   fromMpz :: Mpz -> IO Integer
 }}}

 This would be useful for efficiently interfacing with foreign code that
 uses GMP.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9835>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list