Add types for with-output-to-string, open-output-nowhere
Fix time.ss test not to print svn: r16790
This commit is contained in:
parent
fb29a2498e
commit
25f9bcfe03
|
@ -1,6 +1,5 @@
|
||||||
#lang typed-scheme
|
#lang typed-scheme
|
||||||
|
(require scheme/port)
|
||||||
|
|
||||||
|
|
||||||
(: foo : Number Number -> Number)
|
(: foo : Number Number -> Number)
|
||||||
(define (foo x y)
|
(define (foo x y)
|
||||||
|
@ -14,4 +13,6 @@
|
||||||
(loop (- n 1) (+ (foo c n) acc))
|
(loop (- n 1) (+ (foo c n) acc))
|
||||||
acc))
|
acc))
|
||||||
(loop 10000000 0))
|
(loop 10000000 0))
|
||||||
(time (bar 0))
|
(parameterize ([current-output-port (open-output-nowhere)])
|
||||||
|
(time (bar 0)))
|
||||||
|
|
||||||
|
|
|
@ -733,6 +733,9 @@
|
||||||
;; scheme/port
|
;; scheme/port
|
||||||
[port->lines (cl->* (-Input-Port . -> . (-lst -String))
|
[port->lines (cl->* (-Input-Port . -> . (-lst -String))
|
||||||
(-> (-lst -String)))]
|
(-> (-lst -String)))]
|
||||||
|
[with-output-to-string
|
||||||
|
(-> (-> Univ) -String)]
|
||||||
|
[open-output-nowhere (-> -Output-Port)]
|
||||||
|
|
||||||
;; scheme/path
|
;; scheme/path
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user