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

Explicit namespaces in import lists #1364

Open
qsctr opened this issue Jun 15, 2022 · 0 comments
Open

Explicit namespaces in import lists #1364

qsctr opened this issue Jun 15, 2022 · 0 comments
Labels
feature request Asking for new or improved functionality language Changes or extensions to the language

Comments

@qsctr
Copy link
Contributor

qsctr commented Jun 15, 2022

From #1344: Add a way to specify the namespace to import an identifier from in import lists (i.e. type level or value level). It seems like the current behavior is that if the same name exists in both namespaces then both will be imported, that is

module Example where
foo = 1
type foo = Bit
import Example (foo)

imports both the value foo and the type foo.

Haskell handles this by forcing types to be capitalized so there's no ambiguity, and for operators it only imports the value namespace by default and with the ExplicitNamespaces extension prefixing the operator with type imports the type operator.

@qsctr qsctr added the language Changes or extensions to the language label Jun 23, 2022
@yav yav added the feature request Asking for new or improved functionality label Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Asking for new or improved functionality language Changes or extensions to the language
Projects
None yet
Development

No branches or pull requests

2 participants