Skip to content

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

Closed
@Jashweii

Description

@Jashweii

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions