ekmett / rounded

MPFR bindings for Haskell
http://hackage.haskell.org/package/rounded
BSD 3-Clause "New" or "Revised" License
34 stars 13 forks source link

TypeLits #6

Closed ekmett closed 12 years ago

ekmett commented 12 years ago

It would be nice to support the use fo GHC.TypeLits on 7.6.1 This would let us use

pi :: Rounded TowardZero (Bits 512)

rather than invoking template haskell

pi :: Rounded TowardZero $(bits 512)

like we have to do today.

ekmett commented 12 years ago

Thinking about just limiting us to 7.6.1 to avoid having an API that half disappears on old versions.

ekmett commented 12 years ago

Done. The only problem here is that Bits conflicts with Data.Bits. Maybe it should be polykinded and use the number directly?

copumpkin commented 12 years ago

Probably fine to use the number directly. We think in bits all the time, with Word32 or Int64, and I doubt people will actually ask for "a megabyte worth of significand".

ekmett commented 12 years ago

It now works with

pi :: Rounded TowardZero 512
copumpkin commented 12 years ago

Can we still use Double in there or must we use 53?

On Sep 14, 2012, at 12:31, "Edward A. Kmett" notifications@github.com wrote:

It now works with

pi :: Rounded TowardZero 512 \ Reply to this email directly or view it on GitHub.

ekmett commented 12 years ago

Yep!