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

[New module system] Importing newtypes doesn't seem to work #1483

Closed
yav opened this issue Dec 16, 2022 · 0 comments
Closed

[New module system] Importing newtypes doesn't seem to work #1483

yav opened this issue Dec 16, 2022 · 0 comments
Assignees

Comments

@yav
Copy link
Member

yav commented Dec 16, 2022

Example:

module A where
   newtype T = { x : Integer }

module M where
  import A
  x = T { x = 2 }

This, incorrectly, reports the error:

    Expected a value named 'T' but found a type instead
    Did you mean `(T)?
@yav yav self-assigned this Dec 19, 2022
yav added a commit that referenced this issue Dec 20, 2022
This is also fixes some longstanding tech debt where we were reusing the
name for the type of a newtype and the constructor of a newtype
@yav yav closed this as completed Dec 20, 2022
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

No branches or pull requests

1 participant