Skip to content

Fix/rewrite Scope.hs #1001

Open
Open
@zliu41

Description

@zliu41

The way Scope.hs behaves is fairly erratic. For example:

-- (correctly) suggests mapM
import qualified Control.Monad
x = flip Control.Monad.forM
-- no hint
-- Should suggest: Control.Monad.mapM or Prelude.mapM
import qualified Control.Monad
import qualified Prelude
x = flip Control.Monad.forM
-- suggests mapM
-- Should suggest: Control.Monad.mapM or Prelude.mapM
import qualified Control.Monad
import qualified Prelude
import Data.Int
x = flip Control.Monad.forM

I guess a name should be assumed, if there's no other source of information, to come from Prelude. With this assumption, in the second case it should be able to suggest Prelude.mapM, and in the third case it should know that Data.Int is irrelevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions