-
Notifications
You must be signed in to change notification settings - Fork 2
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
Spec confusion about 'sigerr' #9
Comments
Having thought about it overnight, I now feel that this is a better/saner fix: (def sigerr (msg s r m)
(aif (binding 'err s)
(applyf (cdr it) (list msg) nil s r m)
- (err 'no-err)))
+ (applyf err (list msg) nil s r m))) That is, the underlying implementation always at least has a global The only small issue I see with this is that, according to "The Bel Language": "Errors are signalled by calling err with one argument describing the error." But with a bit of squinting, one can take that to mean "one argument describing the error", plus optionally a bunch of others detailing the evaluator's state. |
Closing this one, since this is a bug in the spec, not in chime. I expect I'll implement |
No, that's just me being confused; the |
This:
Is correct/expected, I believe.
It happens because of the
(no (proper e))
condition inev
:So
sigerr
gets called. Its definition confuses the heck out of me:Can we agree that the
(binding 'err s)
condition will be false at this point?s
at this point isnil
, because the only thing that was on the expression stack was(a . b)
, whichev
took off.What could reasonably have put an
err
binding in the expression stack? In "The Bel Language": "If there isn't a binding for err, then there's an error in the interpreter itself, and we call err about it." It makes it sounds like it was the interpreter's job to establish a binding forerr
. But where; how? There really isn't much code happening between the initialization of the one-element expression stack inbel
, and this point insigerr
. Does that mean the interpreter is erroneous as specified?I think
bel.bel
is wrong here. Maybe this would fix it:The text was updated successfully, but these errors were encountered: