Skip to content

WIP: Avoid relying on OccNames when generating class methods#4932

Draft
crtschin wants to merge 3 commits into
haskell:masterfrom
crtschin:crtschin/class-placeholders-without-occname
Draft

WIP: Avoid relying on OccNames when generating class methods#4932
crtschin wants to merge 3 commits into
haskell:masterfrom
crtschin:crtschin/class-placeholders-without-occname

Conversation

@crtschin
Copy link
Copy Markdown
Collaborator

Follows this comment by SPJ.

I'm able to simplify a bit of code following the above comment and using the class type directly instead of going through the binder environment.

  • Keep a interval map for the instances in a module instead of a flat list of binders.
  • Instead of using HieAST to infer the position and finding the instance declaration via AST traversal, use the cached instance map.
  • Remove the hueristics on finding the right binders, by instead taking class methods and instantiating them with the instance types instead.

@crtschin crtschin force-pushed the crtschin/class-placeholders-without-occname branch from de86e29 to a6a081f Compare May 12, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant