Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 3,610
    • Issues 3,610
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 200
    • Merge Requests 200
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #15320

Closed
Open
Opened Jun 28, 2018 by nboldi@trac-nboldi
  • Report abuse
  • New issue
Report abuse New issue

Save the types in the typechecked syntax tree

When working on development tools that use the GHC API as a backend, it is useful to have information on the types (or kinds) of the elements of the syntax tree (expressions, patterns, types).

I found that the lack of this semantic information is limiting in some cases of refactoring transformations (for example to generate the type signature or extract a subexpression to a binding with type signature), and is necessary for tools that try to fix common programmer errors. But there should be other kind of tools that this little change may help.

The type is currently saved for some expressions and most patterns but it would be useful if it would be available uniformly.

It could be implemented nicely by adding type information to the X* GhcTc type families.

I plan to implement these changes, I'm just asking the opinion of the developers about a change in this direction.

Trac metadata
Trac field Value
Version 8.4.3
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture

Related issues

  • Discussion
  • Designs
Assignee
Assign to
8.10.1
Milestone
8.10.1
Assign milestone
Time tracking
None
Due date
None
4
Labels
feature request hie files P::normal Trac import
Assign labels
  • View project labels
Reference: ghc/ghc#15320