On Tue, 13 Feb 2007, Twan van Laarhoven wrote: > Stefan Heinzmann wrote: > > > Hi all, > > > > is there a library for Haskell that implements scaled integers, i.e. > > integers with a fixed scale factor so that the scale factor does not > > need to be stored, but is part of the type? > > Data.Fixed [1] does exactly that, only it is based on Integer. Using > fixed point with finite sized integers is more tricky, because you have > to be careful not to get overflows in intermediate results.
Is it a good idea to put the HasResolution type class and the types E6 and E12 in Data.Fixed? They are useful for every application where integers shall be encoded in types. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
