Digits

package digits
package
Converts integers to lists of digits and back. Version 0.2
floatDigits :: RealFloat a => a -> Int
base Prelude
floatToDigits :: RealFloat a => Integer -> a -> ([Int], Int)
base Numeric
floatToDigits takes a base and a non-negative RealFloat number, and returns a list of digits and an exponent. In particular, if x>=0, and > floatToDigits base x = ([d1,d2,...,dn], e) then *  >= *  = 0.d1d2...dn * (base** *  <= di <= base
lexDigits :: ReadS String
base Numeric
Reads a non-empty string of decimal digits.
package type-digits
package
Arbitrary ype-level digits, for when the radix itself doesn't actually matter. It's currently base-128, because that seemed to best expedite the compilation of the modules using this package. Please let me know what you find if you experiment with this. Type.Digits.radix is the (arbitrary) radix. Type.Digits.digit computes the NameG of a digit from its value (assuming its less than the radix). Combinators are provided to compute a full type-level numeral from values (potentially) larger than the radix. Version 0.1.0.2