In answering a question on stackoverflow, I noticed that GHCi (interactive) is assigning a too-restrictive type in a let statement. Namely, given the code,
import Control.Arrow
f = maximum &&& id >>> fst &&& (\(m,l) -> length $ filter (==m) l)
(as on my answer to https://stackguides.com/questions/6281813/maximum-of-list-and-count-of-repeat-maximum-number/6283594#6283594), if one inserts a "let" before f
and enters this in ghci, it gives the following type information
Prelude Control.Arrow> :t f
f :: [()] -> ((), Int)
whereas just asking for the type of the expression gives the correct result, namely Ord a => [a] -> (a, Int)
. I'm using ghc 7.0.3.