Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

bad parse for [3 | &foo] #65

Open
jeisner opened this issue Jul 25, 2013 · 3 comments
Open

bad parse for [3 | &foo] #65

jeisner opened this issue Jul 25, 2013 · 3 comments

Comments

@jeisner
Copy link
Collaborator

jeisner commented Jul 25, 2013

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)=?].
@timvieira
Copy link
Collaborator

The parsing error is the same issue as #53.

@timvieira
Copy link
Collaborator

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.

@kosiakk
Copy link
Contributor

kosiakk commented Dec 4, 2013

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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants