Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,403
    • Issues 5,403
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 595
    • Merge requests 595
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #1256
Closed
Open
Issue created Mar 31, 2007 by guest@trac-guest

GHC warns about omitting type signatures; would be more helpful if it supplied inferred type signature

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.

Trac metadata
Trac field Value
Version 6.6
Type FeatureRequest
TypeOfFailure OtherFailure
Priority low
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking