What is going on with the types in this ghci session?
I'm learning Haskell, and I was playing around in ghci when I came across something very puzzling. First, create a simple add function: Prelude> let add x y = x + y Note that it works with ints and floats: Prelude> add 3 4 7 Prelude> add 2.5 1.3 3.8 Now create an apply function. It's identical to $ (but not infix). It works like a no-op on add: Prelude> let apply f x = f x Prelude> apply add 3 4 7 Prelude> apply add 2.5 1.3 3.8 Ok, now make add' which is the same as add' but using apply : Prelude> let add' = apply add Prelude> add' 3 4 7 Prelude> add' 2.5 1.3 <interactive>:1:9: No instance for