Skip to content

Include re-exports in symbol results #99

@carymrobbins

Description

@carymrobbins

After some digging in the source I think I've worked out how to use the symbol command. Quite impressed by how fast these commands run!

For this one, I'm wondering if there's a way to include modules which re-export a symbol? For instance, it seems that no matter what flags you supply, hsdev doesn't tell you that MVar is located in the Control.Concurrent module. Generally, it seems people would rather import MVar from there than GHC.MVar.

% hsdev symbol MVar --exact --module Control.Concurrent
[
  {
    "id": {
      "name": "MVar",
      "module": {
        "location": {
          "dirs": [
            "/Users/me/.stack/programs/x86_64-osx/ghc-8.6.5/lib/ghc-8.6.5/base-4.12.0.0"
          ],
          "exposed": true,
          "name": "GHC.MVar",
          "package": "base-4.12.0.0"
        },
        "name": "GHC.MVar"
      }
    },
    "docs": "An MVar (pronounced \"em-var\") is a synchronising variable, used\nfor communication between concurrent threads. It can be thought of\nas a box, which may be empty or full.",
    "info": {
      "args": [
        "a"
      ],
      "what": "data",
      "ctx": []
    }
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions