Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error about "unknown module value" could highlight existence of type with the same name #3691

Open
michaeljones opened this issue Oct 11, 2024 · 1 comment · May be fixed by #3696
Labels
good first issue Good for newcomers help wanted Contributions encouraged priority:medium

Comments

@michaeljones
Copy link
Contributor

As reported on Discord.

I'm currently getting an error:

error: Unknown module value
   ┌─ /home/michael/root/projects/gleam-lang/plug/src/wisp/plug.gleam:57:7
   │
57 │   wisp.Request(
   │       ^^^^^^^^

The module `wisp` does not have a `Request` value.

It might be helpful it also said something like "There is a Request type in wisp but that cannot be constructed directly. You need to import a type constructor..." Or something like this? With the right words? And better?

Or maybe that is just too complex in this case as wisp.Request is a type alias for something that isn't normally created directly?

@lpil
Copy link
Member

lpil commented Oct 11, 2024

Something like "abc.Xyz is a type/type constructor, it cannot be used as a value"?

@lpil lpil added help wanted Contributions encouraged good first issue Good for newcomers priority:medium labels Oct 11, 2024
@Frank-III Frank-III linked a pull request Oct 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Contributions encouraged priority:medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants