From 913179f2ed6e601e795e07f79e2e38399626ad1e Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Tue, 15 Jun 2010 15:58:22 -0400 Subject: [PATCH] types for basic mpair ops --- collects/typed-scheme/private/base-env.rkt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/collects/typed-scheme/private/base-env.rkt b/collects/typed-scheme/private/base-env.rkt index 11f7a99265..d2e869e84a 100644 --- a/collects/typed-scheme/private/base-env.rkt +++ b/collects/typed-scheme/private/base-env.rkt @@ -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)))))] \ No newline at end of file + ((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))]