dyna
dyna copied to clipboard
bad parse for [3 | &foo]
The rule a = [3 | 4]' gets an errorMalformed list a = &cons(3,4), which is correct (except that I thought we weren't exposing cons anymore?).
But b = [3 | &foo] gets an incorrect error that shows that it oddly interprets | as the boolean operator rather than as the list pipe:
Failed to initialize rule:
b = [3 | &foo].
due to ``|` expected Boolean arguments, got `int` and `Term``
b = [(3 | &foo)=?].
The parsing error is the same issue as #53.
I don't know how not to expose cons in this instance. It ought to be a type error, but alas no static type checking hence the error message.
Currently it gives different error message:
> a = [3 | 4] .
>>> 1 new errors. Type `sol` for details.
> sol
Solution empty.
Errors
======
Uninitialized rules
===================
Failed to initialize rule:
a = [3 | 4] .
due to `Malformed list`
a = &cons(3, 4).