2013-04-26 20:32:41 +00:00
|
|
|
;; -*- scheme -*-
|
2013-04-23 00:55:07 +00:00
|
|
|
(require scribble/racket
|
2013-05-08 11:22:34 +00:00
|
|
|
scribble/eval
|
2013-04-23 00:55:07 +00:00
|
|
|
scriblib/footnote
|
2013-05-08 12:24:32 +00:00
|
|
|
|
|
|
|
slideshow/pict
|
|
|
|
"vm-pictures.rkt"
|
|
|
|
|
2013-05-29 21:23:52 +00:00
|
|
|
"from.rkt"
|
|
|
|
|
2013-04-26 20:32:41 +00:00
|
|
|
(for-syntax racket)
|
|
|
|
(for-label typed/racket/base))
|
|
|
|
|
2013-06-10 22:27:40 +00:00
|
|
|
(require (for-label (only-in marketplace/drivers/tcp-bare tcp)
|
|
|
|
(except-in marketplace/sugar-untyped
|
|
|
|
name-endpoint
|
|
|
|
name-process
|
|
|
|
transition/no-state)
|
|
|
|
(except-in marketplace/sugar-typed
|
|
|
|
?
|
|
|
|
let-fresh
|
|
|
|
match-state
|
|
|
|
match-orientation
|
|
|
|
match-conversation
|
|
|
|
match-interest-type
|
|
|
|
match-reason
|
|
|
|
on-presence
|
|
|
|
on-absence
|
|
|
|
on-message)))
|
2013-05-29 21:23:52 +00:00
|
|
|
|
2013-04-26 20:32:41 +00:00
|
|
|
;; TODO: make it display "=" instead of ":" connecting the defined
|
|
|
|
;; type to the definition.
|
|
|
|
(define-syntax deftype
|
|
|
|
(lambda (stx)
|
|
|
|
(syntax-case stx ()
|
|
|
|
[(_ (t a ...) d desc ...)
|
2013-04-30 19:57:02 +00:00
|
|
|
#`(defthing #:kind "type" t
|
|
|
|
;; This is in column zero because scribble is overscrupulous about location preservation.
|
|
|
|
#,(quasisyntax/loc #'d (All (a ...) d))
|
|
|
|
desc ...)]
|
2013-04-26 20:32:41 +00:00
|
|
|
[(_ t d desc ...)
|
|
|
|
#`(defthing #:kind "type" t d desc ...)])))
|
2013-05-08 12:24:32 +00:00
|
|
|
|
|
|
|
(define (vm-figure p)
|
|
|
|
(centered (to-element (render (scale p 1.2) #:target 'pict))))
|