Add `Any' contract to HtDP languages.

This commit is contained in:
Mike Sperber 2010-09-21 16:23:33 +02:00
parent bf409e6300
commit 98c9ad4d22
6 changed files with 8 additions and 6 deletions

View File

@ -62,7 +62,7 @@
empty true false empty true false
signature : -> mixed one-of predicate combined signature : -> mixed one-of predicate combined
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Any
Property Property
check-property for-all ==> expect expect-within expect-member-of expect-range) check-property for-all ==> expect expect-within expect-member-of expect-range)

View File

@ -44,7 +44,7 @@
empty true false empty true false
signature : -> mixed one-of predicate combined signature : -> mixed one-of predicate combined
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Any
Property Property
check-property for-all ==> expect expect-within expect-member-of expect-range) check-property for-all ==> expect expect-within expect-member-of expect-range)

View File

@ -45,7 +45,7 @@
empty true false empty true false
signature : -> mixed one-of predicate combined signature : -> mixed one-of predicate combined
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Any
Property Property
check-property for-all ==> expect expect-within expect-member-of expect-range) check-property for-all ==> expect expect-within expect-member-of expect-range)

View File

@ -48,7 +48,7 @@
empty true false empty true false
signature : -> mixed one-of predicate combined signature : -> mixed one-of predicate combined
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Any
Property Property
check-property for-all ==> expect expect-within expect-member-of expect-range) check-property for-all ==> expect expect-within expect-member-of expect-range)

View File

@ -48,7 +48,7 @@
empty true false empty true false
signature : -> mixed one-of predicate combined signature : -> mixed one-of predicate combined
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Any
Property Property
check-property for-all ==> expect expect-within expect-member-of expect-range) check-property for-all ==> expect expect-within expect-member-of expect-range)

View File

@ -2881,7 +2881,7 @@
(provide Integer Number Rational Real Natural (provide Integer Number Rational Real Natural
Boolean True False Boolean True False
String Char Symbol Empty-list String Char Symbol Empty-list
Unspecific) Any Unspecific)
(define Integer (signature/arbitrary arbitrary-integer (predicate integer?))) (define Integer (signature/arbitrary arbitrary-integer (predicate integer?)))
(define Number (signature/arbitrary arbitrary-real (predicate number?))) (define Number (signature/arbitrary arbitrary-real (predicate number?)))
@ -2904,6 +2904,8 @@
(define Symbol (signature/arbitrary arbitrary-symbol (predicate symbol?))) (define Symbol (signature/arbitrary arbitrary-symbol (predicate symbol?)))
(define Empty-list (signature (one-of empty))) (define Empty-list (signature (one-of empty)))
(define Any (signature (predicate (lambda (_) #t))))
(define Unspecific (signature (predicate (lambda (_) #t)))) (define Unspecific (signature (predicate (lambda (_) #t))))
; QuickCheck ; QuickCheck