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

import ... open syntax does not work in REPL #2155

Closed
paulcadman opened this issue May 31, 2023 · 0 comments · Fixed by #2156
Closed

import ... open syntax does not work in REPL #2155

paulcadman opened this issue May 31, 2023 · 0 comments · Fixed by #2156

Comments

@paulcadman
Copy link
Collaborator

To reproduce, run the REPL and evaluate:

Stdlib.Prelude> import Stdlib.Data.Nat.Ord open
Stdlib.Prelude> 1 == 2
/repl:1:3-5: error:
Symbol not in scope: ==

The expected evaluation result is false rather than an error here.

The old open import ... syntax works as expected and we have a smoke test:

stdin: "open import Stdlib.Data.Int.Ord\n1 == 1"

Stdlib.Prelude> import Stdlib.Data.Nat.Ord open
Stdlib.Prelude> 1 == 2
false
@paulcadman paulcadman added this to the 0.3.5 milestone May 31, 2023
jonaprieto pushed a commit that referenced this issue Jun 1, 2023
Similar to #2098 which introduced the
new `import ... open` syntax the old syntax is still supported.

The `try` must be removed when the old `open import ...` syntax is
removed.

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

Successfully merging a pull request may close this issue.

1 participant