
29 Jul
2011
29 Jul
'11
11:02 a.m.
On 2011-07-29, at 10:02 AM, Daniel Seidel wrote:
On Fri, 2011-07-29 at 09:49 -0400, Jake Penton wrote:
For example, this does not compile:
f :: Fractional a => a f = 3.14
I can load this to ghci and also compile
Yeah, sorry - so can I. I must have screwed up earlier. Fat fingers, bleary eyes.... But, getting back to my point (or possibly making an unrelated one for all I know), how about this, which I *hope* I am right in saying does NOT compile, even though Bool is an instance of Ord: g :: Ord a => a g = True It still seems to me that the mere presence of a constraint does not make a difference by itself. Does the difference here lie in compiler calls to fromFractional or fromIntegral in appropriate cases? - J -