25 Jun
2013
25 Jun
'13
1:22 p.m.
Hey, While trying to wrap my head around how type inference works in haskell I stumbled across the following inconsistency: If I type :t (*) in ghci, I obtain (*) :: Num a => a -> a -> a But if I write let mul = (*) :t mul I get the less generic type signature mul :: Integer -> Integer -> Integer How is this inconsistency explained? After all, I would expect the haskell compiler to deduce the most generic type possible. Thanks in advance, Stefan.