singletons icon indicating copy to clipboard operation
singletons copied to clipboard

Export numeric functions that are in Prelude

Open goldfirere opened this issue 10 years ago • 4 comments

Things like even, (^), etc. See the export list of Prelude. Make sure to move the definition of (:^) from TypeLits when this is done.

goldfirere avatar May 29 '14 18:05 goldfirere

Speaking of even, it is implemented in terms of rem. Do we plan to provide promoted/singletonized Integral type class?

jstolarek avatar May 30 '14 10:05 jstolarek

I don't see why not. Contrary to what we wrote in the paper, I believe that overloaded numbers are indeed possible during promotion -- just promote a number literal n to be FromInteger n. My promoted Num class redefines fromInteger to take a Nat, not an Integer, and it seems to work out.

goldfirere avatar May 30 '14 15:05 goldfirere

It turns out that doing this would be much easier with match flattening. So this is blocked by #113.

goldfirere avatar Sep 16 '15 19:09 goldfirere

See branch rational.

goldfirere avatar Sep 16 '15 19:09 goldfirere