Skip to content

Textual: equality syntax sugar #24

@dcz-self

Description

@dcz-self

Playing with the REPL example, I noticed that the equals sign is not recognized. In my usage of Prolog, it's rather common:

?- A = config(_, _).
Failed to parse: ParseError { span: 2..3, kind: UnrecognizedToken }
?- :define eq(A, A).
Defined!
?- eq(A, config(_, _)).
Found solution:
  A = config(_1, _2)

For my application, it would be rather important to be able to leverage general Prolog knowledge - a Prolog-like solver is already unfamiliar territory for the intended user of my project (finding camera configs).

It's an infix operator, as opposed to what logru supports now, and it would translate to an actual predicate, while as far as I can tell, there is no standard library in logru at all.

Would you be interested if I tried to implement it? What's the best place?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions