Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Import suggestions for out of scope type class methods in instance declarations #1423

Closed
Jashweii opened this issue Feb 21, 2021 · 1 comment

Comments

@Jashweii
Copy link

Jashweii commented Feb 21, 2021

Example:

data X = X
instance Semigroup X where
  (<>) _ _ = X
  -- stimes is not imported
  stimes _ _ = X

HLS should suggest importing stimes (it does if instead used in an expression), and should probably import when using the "add placeholders for ". (Note it could be a qualified import.)

(GHC 8.10.4, cabal 3.2.0.0, stack 2.5.1 (unused), hls 0.9.0.0 (built from latest source), vscode)

@July541
Copy link
Collaborator

July541 commented Jul 5, 2022

Close and continue in a smaller scope. #3017

@July541 July541 closed this as completed Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants