Skip to content

Infix expressions {_ _ x} and {_ _ _} fail #1

@plane

Description

@plane

Infix expressions fail if both the operator and left-hand side are placeholders:

(check-equal? ({_ + 3} 2    ) 5)
(check-equal? ({2 _ 3}   +  ) 5)
(check-equal? ({2 + _}     3) 5)
(check-equal? ({_ _ 3} 2 +  ) 5)   ;; test fails; FIXME
(check-equal? ({_ + _} 2   3) 5)
(check-equal? ({2 _ _}   + 3) 5)
(check-equal? ({_ _ _} 2 + 3) 5)   ;; test fails; FIXME

This fails because happy-app tries to evaluate them as prefix expressions instead:

> ({_ _ _} + 1 2)
3
> ({_ _ 2} + 1)
3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions