singletons
singletons copied to clipboard
Export numeric functions that are in Prelude
Things like even
, (^)
, etc. See the export list of Prelude
. Make sure to move the definition of (:^)
from TypeLits when this is done.
Speaking of even
, it is implemented in terms of rem
. Do we plan to provide promoted/singletonized Integral
type class?
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.
It turns out that doing this would be much easier with match flattening. So this is blocked by #113.
See branch rational
.