From ea9467c8269ce3312dc9a49766b9d677fc88d0f3 Mon Sep 17 00:00:00 2001 From: Jordan Johnson Date: Sun, 28 Jun 2015 12:36:35 -0700 Subject: [PATCH] net/url: fix PortT/Bytes, HTTP-Connection * PortT/Bytes now correctly lists the Bytes parameter as _not_ optional. (For that matter, so does PortT/String.) * HTTP-Connection was defined as an opaque type in net/url, but really is the same type defined in net/http-client, so now it is imported from there. --- typed-racket-more/typed/net/url.rkt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/typed-racket-more/typed/net/url.rkt b/typed-racket-more/typed/net/url.rkt index c94f4822..8fb1d3fd 100644 --- a/typed-racket-more/typed/net/url.rkt +++ b/typed-racket-more/typed/net/url.rkt @@ -7,15 +7,18 @@ ;; opaque types (require/typed/provide net/url - [#:opaque URL-Exception url-exception?] - [#:opaque HTTP-Connection http-connection?]) + [#:opaque URL-Exception url-exception?]) +(require (only-in typed/net/http-client + HTTP-Connection + [http-conn? http-connection?])) +(provide HTTP-Connection http-connection?) ;; convenience type aliases ;; PortT/String is unused, but was provided by earlier versions of this module, so it's included here (define-type PortT ([URL] [(Listof String)] . ->* . Input-Port)) -(define-type PortT/String ([URL] [String (Listof String)] . ->* . Input-Port)) -(define-type PortT/Bytes ([URL] [Bytes (Listof String)] . ->* . Input-Port)) +(define-type PortT/String ([URL String] [(Listof String)] . ->* . Input-Port)) +(define-type PortT/Bytes ([URL Bytes] [(Listof String)] . ->* . Input-Port)) (provide PortT PortT/String PortT/Bytes) (require/typed/provide