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

False domain error reported when name of expected verb instead refers to a noun #207

Open
cchando opened this issue Aug 17, 2024 · 2 comments

Comments

@cchando
Copy link

cchando commented Aug 17, 2024

   f=: N+]
   N=: 3
   f 1
|domain error in N, executing monad N
|       f 1

Because N wasn't defined at the time that f was, it was assumed to be a verb. When the execution of [N as a verb] was attempted, an error was raised because it instead referred to a noun.

This is reported as a domain error, which it is confusing; it should be interpreted as a value error since it concerns N's part-of-speech only. It might say e.g.

|value error in N, executing monad N: N was expected to be a verb, but is defined as a noun
|       f 1

Perhaps better would be to instead attempt to interpret N as a noun and apply the containing expression accordingly, upon the interpreter seeing that N is a noun (or just as a general fallback to attempted verb interpretations). This latter suggestion might not be feasible, depending on implementation details.

@HenryHRich
Copy link
Contributor

HenryHRich commented Aug 18, 2024 via email

@HenryHRich
Copy link
Contributor

HenryHRich commented Aug 18, 2024 via email

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

2 participants