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

Reexporting a module of the same name as the current module does not behave as expected #4426

Open
jy14898 opened this issue Dec 9, 2022 · 0 comments

Comments

@jy14898
Copy link
Contributor

jy14898 commented Dec 9, 2022

Description

module X (myInt, module X) where

import Prelude as X

myInt = 10

silently only exports myInt, nothing from Prelude. I've encountered this bug while refactoring imports and the names they get qualified into.

To Reproduce

Build the above example and try to import unit from X (in a repl for example), or anything else from Prelude.

Expected behavior

Either:

  • Ban re-exporting the current module (not explicitly by name, just throw an unknown module error if there are no qualified imports for the name)
  • Correctly merge qualified imports with the current module name for exports, as is done with other imports

Additional context

PureScript version

0.15.4

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

No branches or pull requests

1 participant