
30 Mar
2009
30 Mar
'09
9:09 p.m.
2009/03/27 Ivan Moore
The reason (which is a bit confusing) is that it typechecks just fine---if there *were* a type which is an instance of both Integral and Floating (and I guess round needs RealFrac as well), n could have that type. There isn't such a type in the standard libraries, but in theory you could make up your own type which is an instance of both.
If there were such a type, could "10" have that type and then would my problem have not existed?
Yes, that is correct.
in which case, why doesn't it!?
Does it actually make any logical sense for a type to be both integral (governed by rules of modular division) and floating point (governed by rules of IEEE 754 division)? -- Jason Dusek