Redux: Qualify types as necessary in errors and warnings by MonoidMusician · Pull Request #4409 · purescript/purescript · GitHub
Skip to content

Redux: Qualify types as necessary in errors and warnings - #4409

Open
MonoidMusician wants to merge 12 commits into
masterfrom
mm/diagnostic-qualification
Open

MonoidMusician wants to merge 12 commits into
masterfrom
mm/diagnostic-qualification

Conversation

@MonoidMusician

Copy link
Copy Markdown
Contributor

Continuing from #4337. Just fixed merge conflicts so far.

Checklist:

  • Added a file to CHANGELOG.d for this PR (see CHANGELOG.d/README.md)
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@MonoidMusician

Copy link
Copy Markdown
Contributor Author

@MonoidMusician

Copy link
Copy Markdown
Contributor Author

It might help to disallow importing modules as Prim. It seems that it already results in a warning, due to the implicit import import Prim as Prim given to every module:

  Module Prim was imported as Prim with unspecified imports.
  As there are multiple modules being imported as Prim, consider using the explicit form:

    import Prim (Function, Record) as Prim

@MonoidMusician

Copy link
Copy Markdown
Contributor Author

The issue of global modules that haven't been imported locally yet also rears its head in IDE suggestions: because you can only have one span for suggestions, you can't suggest a type and also suggest imports for that type. So we can only have suggestions that actually work if all of the types already are in scope.

@nwolverson

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants