gleam-lang/gleam

Show hint to import unqualified types/values

Open

#4,297 opened on Mar 3, 2025

View on GitHub
 (8 comments) (0 reactions) (0 assignees)Rust (21,417 stars) (960 forks)batch import
help wanted

Description

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.

Contributor guide

Show hint to import unqualified types/values · gleam-lang/gleam#4297 | Good First Issue