id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
6022,GHC infers over-general types,simonpj,simonpj,"Consider
{{{
f x = x + head
}}}
GHC will (with no flags) will compile this almost-certainly-wrong program, giving `f` the type
{{{
    f :: forall a. Num ([a] -> a) => ([a] -> a) -> [a] -> a
}}}
There's nothing wrong with that type, and in principle someone might later define a suitable instance of `Num`, but (a) it's not Haskell 98, and (b) it's unlikely to be right, so we've deferred a type error from the definition site of `f` to the (perhaps much later) call site.

I think GHC should complain, and require a type signature if that's what you really want.  This came up on [http://stackoverflow.com/questions/10091874/haskell-why-is-there-no-type-mismatch-and-why-does-this-compile Stackoverflow]",bug,new,high,7.8.1,Compiler,7.4.1,,,hackage.haskell.org@…,Unknown/Multiple,Unknown/Multiple,None/Unknown,Unknown,,,,
