ajhc / ajhc

A fork of jhc. And also a Haskell compiler.
Other
134 stars 28 forks source link

integer-simple? #36

Open singpolyma opened 11 years ago

singpolyma commented 11 years ago

The user manual says that ajhc has no arbitrary-precision Integer yet. Has anyone looked into porting the pure-Haskell integer-simple implementation from GHC to ajhc to be used as a basis for this?

master-q commented 11 years ago

Planed, but not yet. Integer is a big problem for us. See #1 for detail.

The known_bugs.NoMonomorphism test errors with overflowing Integer. Jhc's Integer has width in bits as same as IntMax. Detail: https://github.com/ajhc/ajhc-dumpyard/blob/master/known_bugs.NoMonomorphism_slim/NoMonomorphism_slim.hs

To fix it, we choose below impls. Umm...

a. Porting integer-simple library from GHC. http://hackage.haskell.org/trac/ghc/wiki/Commentary/Libraries/Integer b. Porting dtoa function from NetBSD. http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/gdtoa/?only_with_tag=MAIN