Proposal: add conversion functions to Data.Fixed.
Herbert Valerio Riedel
hvr at gnu.org
Sun Dec 2 10:25:10 CET 2012
Edward Kmett <ekmett at gmail.com> writes:
> To be frank, I would just rather have access to the constructor to Fixed.
> It honestly strikes me as silly to have to pay for a division and/or
> multiplication every time I want to access one.
> There in an ideological distinction being maintained here about the one
> true usage pattern that has forced me to reimplement Data.Fixed in my own
> code to avoid the overhead. =(
Fwiw, I've sometimes wanted to have 'Int' based fixed-precision
arithmetic, and the current Data.Fixed allows only for "big-num" based
Just a thought: Why does Data.Fixed have to be in 'base' anyway if the
interface doesn't seem to be agreed upon by everyone? Can't we split it
off into a separate package where it can more easily evolve into a
I've done a quick head-count over the ~4600 packages on hackage
w.r.t. which import Data.Fixed, and I found the 45 packages below which
directly import it. So splitting Data.Fixed from 'base' would affect
only about 1% of packages...
More information about the Libraries