[racket] TR and ports (in two senses)

From: Jordan Johnson (jmj at fellowhuman.com)
Date: Fri May 16 13:04:17 EDT 2014

Hi all,

As part of familiarizing myself with Typed Racket I thought I'd port one or
two of the untyped Racket libraries to TR. This raised a few questions:

1) Looking at the TR docs and GitHub repo, AFAICT new library ports go
in pkgs/typed-racket-pkgs/typed-racket-more/typed -- is that right?

2) I don't see documentation or tests for other ported libraries in
general, presumably because they're just wrappers; so, does it suffice to
submit only one file -- the library itself -- or are there more files I'm
not noticing, that go with each library? (Seems I should be documenting the
types I define, but I don't see where those docs would go.)

3) One of the libs I looked at porting, openssl, raised a question about
subtyping: SSL ports. It appears to me that internally these are standard
Racket input/output ports tagged as special by the openssl library. It
seems straightforward enough to create an opaque type like

(require/opaque-type SSL-Port ssl-port? openssl)

but that doesn't capture the idea that every ssl-port should also be of
type Input-Port or Output-Port (as defined in TR already). First, is that
idea correct? And if so, what piece am I missing, to make that happen?

Best,
jmj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140516/03aa7462/attachment.html>

Posted on the users mailing list.