Open countvajhula opened 3 months ago
flow.rkt> (~>> (odd?) (as p) (range 10) (filter p)) ; /Users/siddhartha/work/lisp/racket/qi/qi-test/tests/flow.rkt:11:16: let: duplicate identifier ; at: p ; in: (let ((p undefined) (p undefined) (p undefined)) (qi0->racket (thread (thread (esc (λ (p2) (set! p p2))) ground) (esc ((λ (v) (λ rest (apply v 10 (append rest (list))))) (contract (->* (real?) (real? real?) any) (range->cstream-prepare (cstream-next->li...
Expected: '(1 3 5 7 9)
'(1 3 5 7 9)
Also, the expansion appears to have many duplicate bindings.
flow.rkt> (~> (odd?) (as p) (range 10) △ (pass p)) ; filter: contract violation ; expected: (any/c . -> . any/c) ; given: #<undefined>
Expected: 1, 3, 5, 7, 9
1, 3, 5, 7, 9
(The error message should also implicate pass rather than filter.)
pass
filter
flow.rkt> (~> (odd?) (as p) p) ; compose: contract violation ; expected: procedure? ; given: #<undefined> ; argument position: 1st ; other arguments...: ; #<procedure:composed>
Expected: arity error, 0 arguments provided to odd?, same as (odd?)
odd?
(odd?)
flow.rkt> (~> (odd?) (as p) (gen p)) #<procedure:odd?>
flow.rkt> (~> (5) (as p) (gen p)) 5
(works as expected)
Qi binding in Racket expression
Expected:
'(1 3 5 7 9)
Also, the expansion appears to have many duplicate bindings.
Qi binding in Qi expression
Expected:
1, 3, 5, 7, 9
(The error message should also implicate
pass
rather thanfilter
.)Using a Qi binding as a primitive flow
Expected: arity error, 0 arguments provided to
odd?
, same as(odd?)
Bindings used in non-floe positions
(works as expected)