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
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to