# Integer representation

7 messages
Open this post in threaded view
|

## Integer representation

 Is there any way to determine whether Integer comes from integer-gmp or integer-simple? I'm playing with the idea of using the underlying representation to get more compact/efficient tries, but I need to be able to find out what that representation is. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafeOnly members subscribed via the mailman list are allowed to post.
Open this post in threaded view
|

## Re: Integer representation

 Here a guess:    #if !(MIN_VERSION_integer-gmp(0,0,0))Not sure if this works, but it might.On Thu, Apr 19, 2018 at 1:13 PM, David Feuer wrote:Is there any way to determine whether Integer comes from integer-gmp or integer-simple? I'm playing with the idea of using the underlying representation to get more compact/efficient tries, but I need to be able to find out what that representation is. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.-- -Andrew Thaddeus Martin _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafeOnly members subscribed via the mailman list are allowed to post.
Open this post in threaded view
|

## Re: Integer representation

 In reply to this post by David Feuer Hi David, On 19/04/18 18:13, David Feuer wrote: > Is there any way to determine whether Integer comes from integer-gmp > or integer-simple? I'm playing with the idea of using the underlying > representation to get more compact/efficient tries, but I need to be > able to find out what that representation is. One way could be to use an automatic cabal flag.  With it enabled, depend on integer-gmp and add hs-source-dirs to a directory containing your integer-gmp implementation, with it disabled, depend on integer-simple and add hs-source dirs to a directory containing your integer-simple implementation.  This gives module-level control.  With automatic flag I think cabal will try both and choose the setting that gives the best build plan (likely corresponding to the Integer implementation of your ghc). Claude -- https://mathr.co.uk_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafeOnly members subscribed via the mailman list are allowed to post.
Open this post in threaded view
|

## Re: Integer representation

Open this post in threaded view
|