GHC warns about omitting type signatures; would be more helpful if it supplied inferred type signature
|Reported by:||guest||Owned by:|
|Type of failure:||Difficulty:||Unknown|
|Test Case:||Blocked By:|
When I'm just messing around with very complex (or even fairly simple) Haskell programs, like Darcs or GHC, it often is much easier to just comment out the type signatures and then proceed to code. But the problem is that sometimes I then can't figure out what the new type signature for a function is!
Normally I would just fire up GHCi and do a :type request, but that's not always possible, particularly with really complex ones (I still haven't figured out how to successfully load Darcs into GHCi). But everytime it compiles, -Wall causes GHC to spit out a warning that the type signature is not provided - but it doesn't say what it infers the type signature to be! That information would be very useful to me (I could copy-and-paste it, or specialize it a bit more, or realize that while my program compiles and type-checks, it isn't actually doing what I thought, etc.)
So when GHC warns that a type signature wasn't found, could it maybe also print out what type signature *was* inferred? It'd make the warning much more useful, and doesn't seem like a big change.