Remove wrapping in typed/racket/async-channel

Now that TR supports contracted functions, the wrapping
is not necessary.
This commit is contained in:
Asumu Takikawa 2014-06-30 14:50:28 -04:00
parent b6e4a06320
commit 864cda2614
2 changed files with 1 additions and 25 deletions

View File

@ -2,7 +2,7 @@
;; This module provides a typed version of racket/async-channel
(require "private/async-channel-wrapped.rkt"
(require racket/async-channel
(for-syntax (only-in (rep type-rep) make-Async-ChannelTop)))
;; Section 11.2.4 (Buffered Asynchronous Channels)

View File

@ -1,24 +0,0 @@
#lang racket
(require (for-syntax racket/syntax))
(require (prefix-in r: racket/async-channel))
;; all the functions from racket/async-channel, but wrapped to hide contracts
;; create "r:" prefixed identifier
(define-for-syntax (r: id) (format-id id "r:~a" id))
;; eta expand to hide contracts
(define-syntax (provide/eta stx)
(syntax-case stx ()
[(_ f ...)
(with-syntax ([(r:f ...) (map r: (syntax->list #'(f ...)))])
#'(begin
(define (f . xs) (apply r:f xs)) ...
(provide f ...)))]))
(provide/eta async-channel?
make-async-channel
async-channel-get
async-channel-try-get
async-channel-put
async-channel-put-evt)