Skip to content

Show hint to import unqualified types/values #4297

@GearsDatapacks

Description

@GearsDatapacks

For example:

import gleam/dict

type Grid(a) {
  Grid(Dict(#(Int, Int), a))
}

This is an error, since Dict is not imported. However, gleam/dict is. So we could either give a hint to import it unqualified: gleam/dict.{type Dict}, or (probably preferably), qualify it: dict.Dict(...)
We could either just check for this in imported modules, or all importable modules.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions