GHC Bug or User Error?

Zachary Turner divisortheory at gmail.com
Sun Dec 6 23:57:58 EST 2009


GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> let f x = x*x
Prelude> let g x y = x+y
Prelude> let q x y = (f . g) x y
Prelude> :t q
q :: (Num (a -> a), Num a) => a -> a -> a


I'm somewhat of a beginner so the error could definitely be my own, but it
seems to me like the third line should be rejected by GHCi.  As for the 4th
line, the type of q seems nonsensical to me.  I can't figure out any
possible valid meaning of 'Num (a -> a) '.

Can anyone shed some light on this?

Zach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20091206/5a1032e2/attachment-0001.html


More information about the Glasgow-haskell-users mailing list