types for basic mpair ops

original commit: 913179f2ed6e601e795e07f79e2e38399626ad1e
This commit is contained in:
Sam Tobin-Hochstadt 2010-06-15 15:58:22 -04:00
parent 36d46fac77
commit 4ed047109d

View File

@ -13,6 +13,7 @@
(for-syntax (only-in racket/private/pre-base new-apply-proc)
#;racket/string)
scheme/promise scheme/system
racket/mpair
(only-in string-constants/private/only-once maybe-print-message)
(only-in mzscheme make-namespace)
(only-in racket/match/runtime match:error matchable? match-equality-test)
@ -912,4 +913,9 @@
;; probably the most useful cases
[curry (-poly (a b c)
(cl->* ((a b . -> . c) a . -> . (b . -> . c))
((a b . -> . c) . -> . (a . -> . (b . -> . c)))))]
((a b . -> . c) . -> . (a . -> . (b . -> . c)))))]
;; mutable pairs
[mcons (-poly (a b) (-> a b (-mpair a b)))]
[mcar (-poly (a b) (-> (-mpair a b) a))]
[mcdr (-poly (a b) (-> (-mpair a b) b))]
[mpair? (make-pred-ty (make-MPairTop))]