Unexpected module resolution
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
Start by running both import examples on ArkScript 4.7.2 and tracing how import order resolves unqualified names. Compare the resolution of max with the explicitly imported list:max and the qualified math:max. Done means both examples resolve max to list:max regardless of import order.
Written by the indexing model from the issue text.
Description
What happened?
(import std.Prelude)
(import std.List:*)
(print (max [1 2]))
(import std.Prelude)
(import std.List :max)
(print (max [1 2]))
In both these examples, I would expect max to be list:max, but instead it's math:max. I find that confusing, because math:max is not defined nor imported without the prefix in either module.
Both examples work as I'd expect (max resolving to math:max--EDIT: list:max, sorry!) if the order of imports is reversed.
What ArkScript version are you seeing the problem on?
4.7.2
Operating System
Linux
Compiler used
None
Compiler version used
No response
Relevant code & log output
ArityError: When calling `(math:max [1 2])', received 1 argument, but expected 2: `(math:max _a _b)'
At IP: 597, PP: 0, SP: 3
exit status 1
Documentation
- I have read existing related documentation before submitting this report
- I have searched for an existing issue before posting
- Dominant language
- C++
- Stars
- 729
- Forks
- 54
- Avg merge
- 4h 8m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ArkScript-lang/Ark
-
🤔 help wanted ark/repl documentation enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
ArkScript-lang/Ark#711 ·
-
❗️ priority/low 👷 ci 🤔 help wanted github_actions
Difficulty 5/5 Over a week Newbie friendliness 30/100
ArkScript-lang/Ark#708 ·
-
Link Checker Report Openautomated issue report
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
ArkScript-lang/Ark#700 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
ArkScript-lang/Ark#631 ·
-
❗️ priority/low 👷 ci 🧪 tests
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ArkScript-lang/Ark#506 ·
All issues in ArkScript-lang/Ark
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·