Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add code-action to fill in functions required for implementing a type-class #652

Closed
fendor opened this issue Dec 7, 2020 · 3 comments · Fixed by #661
Closed

Add code-action to fill in functions required for implementing a type-class #652

fendor opened this issue Dec 7, 2020 · 3 comments · Fixed by #661
Assignees
Labels

Comments

@fendor
Copy link
Collaborator

fendor commented Dec 7, 2020

E.g. on a code-snippet:

data Bar = Bar

instance Show Bar where

The code-action should offer (semantically):

data Bar = Bar

instance Show Bar where
  showsPrec = undefined

and

data Bar = Bar

instance Show Bar where
  show = undefined

This could explode exponentially if there are complex Minimal pragmas, but I guess that is fine.
The stub-definition could be implemented with snippets.

@fendor fendor added the type: enhancement New feature or request label Dec 7, 2020
@fendor
Copy link
Collaborator Author

fendor commented Dec 7, 2020

I don't know how easy/difficult it would be to implement something like that.

@ocharles
Copy link
Contributor

ocharles commented Dec 8, 2020

I'd suggest holes instead of undefined

@Ailrun
Copy link
Member

Ailrun commented Dec 8, 2020

I will try this using a similar idea with the AddPragma plugin (NVM, I took a different pathway)

@Ailrun Ailrun self-assigned this Dec 8, 2020
pepeiborra added a commit that referenced this issue Dec 27, 2020
* Add a test for #726

* Add a test for #652

* Fix missing qualifiers in code actions
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants