Add failure cases.
original commit: 88cbe6387952e9da5e57c46c9977a15702e41b82
This commit is contained in:
parent
cc2b39add3
commit
760559a6db
16
collects/tests/typed-scheme/fail/values-dots.ss
Normal file
16
collects/tests/typed-scheme/fail/values-dots.ss
Normal file
|
@ -0,0 +1,16 @@
|
|||
#;
|
||||
(exn-pred 2)
|
||||
#lang typed-scheme
|
||||
|
||||
(require typed-scheme/private/extra-procs)
|
||||
|
||||
(: map-with-funcs (All (b ...) ((b ... b -> b) ... b -> (b ... b -> (values b ... b)))))
|
||||
(define (map-with-funcs . fs)
|
||||
(lambda bs
|
||||
(apply values* (map (lambda: ([f : (b ... b -> b)])
|
||||
(apply f bs)) fs))))
|
||||
|
||||
(map-with-funcs (lambda () 1))
|
||||
|
||||
(map-with-funcs (lambda: ([x : Integer] [y : Integer] . [z : Integer *])
|
||||
(+ x y)))
|
|
@ -16,12 +16,13 @@
|
|||
(apply values* (map (lambda: ([f : (b ... b -> b)])
|
||||
(apply f bs)) fs))))
|
||||
|
||||
#;(map-with-funcs + - * /)
|
||||
(map-with-funcs + - * /)
|
||||
|
||||
(inst map-with-funcs Integer Integer)
|
||||
|
||||
#;(map-with-funcs (lambda: ([x : Integer] [y : Integer]) (+ x y))
|
||||
(lambda: ([x : Integer] [y : Integer]) (- x y)))
|
||||
(map-with-funcs
|
||||
(lambda: ([x : Integer] [y : Integer]) (+ x y))
|
||||
(lambda: ([x : Integer] [y : Integer]) (- x y)) )
|
||||
|
||||
(((inst map-with-funcs Integer Integer)
|
||||
(lambda: ([x : Integer] [y : Integer]) (+ x y))
|
||||
|
|
Loading…
Reference in New Issue
Block a user