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 (960 forks)batch import
help wanted

Repository metrics

Stars
 (21,417 stars)
PR merge metrics
 (Avg merge 10d 19h) (69 merged PRs in 30d)

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