[Haskell-cafe] Integer representation

Claude Heiland-Allen claude at mathr.co.uk
Thu Apr 19 19:01:51 UTC 2018

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).


More information about the Haskell-Cafe mailing list