Skip to content

GitLab

  • Menu
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 4,869
    • Issues 4,869
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • 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 Compiler
  • GHCGHC
  • Issues
  • #20339
Closed
Open
Created Sep 07, 2021 by Ziyang Liu@zliu41Developer

Inconsistent naming of specialized functions in Core

For a method meth in class Foo a, when a is specialized to A in Core, the name of the method is sometimes $fFooA_$cmeth, and sometimes something like $fFooA3.

Also, when Foo has a subclass, say Foo a => Bar a, sometimes the name of the method becomes $fBarA_$meth.

So there are multiple different namings of the same method. This can make writing Core plugins more difficult. For example, among other things, it makes it more difficult to detect whether a function is recursive. I've encountered cases where $fFooA_$cmeth is recursive, but its unfolding contains $fFooA3 rather than $fFooA_$cmeth.

Is it possible to make such naming consistent?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking