Reexport GHC.Integer.Logarithms from base

Andrew Martin andrew.thaddeus at gmail.com
Sun Jan 8 21:50:39 UTC 2017


The packages integer-simple and integer-gmp each provide a module named
GHC.Integer.Logarithms. In both packages, this module exports identical
functions. The two useful ones are:

1. integerLog2#
2. integerLogBase#

There is a third function wordLog2# that not as helpful since its
implementation is trivial. It would be really nice to be able to use the
two integer logarithm functions and only incur a dependency on base. The
easiest way to accopmlish this would be to reexport the module from
base. However, I'm fine with any other approach that ends up making these
functions more accessible. Are there good reasons not to do this? Do
others feel like this should/shouldn't be done? Thanks for any further
input.

-Andrew Martin


More information about the Libraries mailing list