# [Haskell-cafe] Why is it so different between 6.12.1 and 6.10.4_1 ?

zaxis z_axis at 163.com
Fri Mar 26 20:20:12 EDT 2010

```In 6.12.1 under archlinux
>let f x y z = x + y + z
> :t f
f :: (Num a) => a -> a -> a -> a

> :t (>>=) . f
(>>=) . f :: (Num a) => a -> ((a -> a) -> a -> b) -> a -> b
> ((>>=) . f) 1 (\f x -> f x) 2
5

In 6.10.4_1 under freebsd
> let f x y z = x + y + z
*Money> :t f
f :: (Num a) => a -> a -> a -> a

> :t (>>=) . f
(>>=) . f  :: (Monad ((->) a), Num a) => a -> ((a -> a) -> a -> b) -> a -> b
> ((>>=) . f) 1 (\f x -> f x) 2

<interactive>:1:1:
No instance for (Monad ((->) a))
arising from a use of `>>=' at <interactive>:1:1-5
In the first argument of `(.)', namely `(>>=)'
In the expression: ((>>=) . f) 1 (\ f x -> f x) 2
In the definition of `it': it = ((>>=) . f) 1 (\ f x -> f x) 2

Sincerely!

-----
fac n = let {  f = foldr (*) 1 [1..n] } in f
--
View this message in context: http://old.nabble.com/Why-is-it-so-different-between-6.12.1-and-6.10.4_1---tp28049329p28049329.html