[Haskell-cafe] Perl-style numeric type
byorgey at gmail.com
Tue Jun 19 14:27:47 EDT 2007
I've started developing a library to support a "Perl-style" numeric type
that "does the right thing" without having to worry too much about types.
Explicit static typing of numeric types is really great most of the time,
and certainly a good idea for larger projects, but probably everyone's had
one of those experiences where you just want to write some simple, "one-off"
numeric code that ends up getting cluttered with all sorts of fromIntegers
and whatnot just to make the type checker happy. The idea would be to
internally use either an Integer, Rational, or Double, and transparently
convert between them as necessary. I know I would enjoy having such a
numeric type for use in, e.g. programs to solve Project Euler problems.
But before I get too far (it looks like it will be straightforward yet
tedious to implement), I thought I would throw the idea out there and see if
anyone knows of anything similar that has already been done before (a
cursory search of the wiki didn't turn up anything). I don't want to
reinvent the wheel here.
PS Also, did anyone get my e-mail to this list of June 8 about Template
Haskell and QuickCheck? If you did and it's just that no one knows the
answer to my questions, no problem. But I was subscribed in a strange way
(through the fa.haskell Google group) and I'm beginning to suspect that
perhaps my message never actually got sent over the list. If so I could
resend it now that I'm subscribed by more conventional means.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe