www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit dad2c26c496c3232b76d354a1d9f25e9c1d3e08a
parent 33996e71ac5e40b7e6e10ad5d5b0f55c0e6f7d7b
Author: Stephen Chang <stchang@ccs.neu.edu>
Date:   Thu,  8 Oct 2015 13:22:26 -0400

add existential tests demonstrating hidden type

Diffstat:
Mtapl/tests/exist-tests.rkt | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/tapl/tests/exist-tests.rkt b/tapl/tests/exist-tests.rkt @@ -76,6 +76,14 @@ (∃ (Counter) (× [new : Counter] [get : (→ Counter Int)] [inc : (→ Counter Counter)]))) +(typecheck-fail + (open ([(Counter counter) <= counterADT]) + (+ (proj counter new) 1)) + #:with-msg "Arguments to function \\+ have wrong type") +(typecheck-fail + (open ([(Counter counter) <= counterADT]) + ((λ ([x : Int]) x) (proj counter new))) + #:with-msg "Arguments to function.+have wrong type") (check-type (open ([(Counter counter) <= counterADT]) ((proj counter get) ((proj counter inc) (proj counter new))))