Noddy switch to #:transparent from #:prefab to see what breaks

This commit is contained in:
Tony Garnock-Jones 2013-05-10 15:32:40 -04:00
parent 1c79b1723e
commit a6d66194d1
4 changed files with 20 additions and 20 deletions

View File

@ -66,7 +66,7 @@
set-timer-repr ([label : TLabel]
[msecs : TMsecs]
[kind : TKind])
#:prefab)
#:transparent)
(pseudo-substruct: (set-timer-repr TimerLabel Real TimerKind)
SetTimer set-timer set-timer?)
@ -81,7 +81,7 @@
(struct: (TLabel TMsecs)
timer-expired-repr ([label : TLabel]
[msecs : TMsecs])
#:prefab)
#:transparent)
(pseudo-substruct: (timer-expired-repr TimerLabel Real)
TimerExpired timer-expired timer-expired?)

View File

@ -46,7 +46,7 @@
(struct: (THost TPort)
udp-remote-address-repr ([host : THost]
[port : TPort])
#:prefab)
#:transparent)
(pseudo-substruct: (udp-remote-address-repr String Natural)
UdpRemoteAddress udp-remote-address udp-remote-address?)
(pseudo-substruct: (udp-remote-address-repr (U Wild String) (U Wild Natural))
@ -54,7 +54,7 @@
(struct: (TId)
udp-handle-repr ([id : TId])
#:prefab)
#:transparent)
(pseudo-substruct: (udp-handle-repr Any)
UdpHandle udp-handle udp-handle?)
(pseudo-substruct: (udp-handle-repr (U Wild Any))
@ -62,7 +62,7 @@
(struct: (TPort)
udp-listener-repr ([port : TPort])
#:prefab)
#:transparent)
(pseudo-substruct: (udp-listener-repr Natural)
UdpListener udp-listener udp-listener?)
(pseudo-substruct: (udp-listener-repr (U Wild Natural))
@ -84,7 +84,7 @@
udp-packet-repr ([source : TSource]
[destination : TDestination]
[body : TBody])
#:prefab)
#:transparent)
(pseudo-substruct: (udp-packet-repr UdpAddress UdpAddress Bytes)
UdpPacket udp-packet udp-packet?)
(pseudo-substruct: (udp-packet-repr UdpAddressPattern UdpAddressPattern (U Wild Bytes))
@ -96,7 +96,7 @@
(struct: (TAddress TSocket)
handle-mapping-repr ([address : TAddress]
[socket : TSocket])
#:prefab)
#:transparent)
(pseudo-substruct: (handle-mapping-repr UdpLocalAddress Any)
;; ^ TODO: Want to use UDP-Socket instead of Any here
HandleMapping handle-mapping handle-mapping?)

View File

@ -22,7 +22,7 @@
(struct: role ([orientation : Orientation]
[topic : Topic]
[interest-type : InterestType])
#:prefab)
#:transparent)
(define-type Role role)
(define-type Message Topic) ;; Cheesy.
@ -38,9 +38,9 @@
AbsenceEvent
MessageEvent))
(struct: presence-event ([role : Role]) #:prefab)
(struct: absence-event ([role : Role] [reason : Reason]) #:prefab)
(struct: message-event ([role : Role] [message : Message]) #:prefab)
(struct: presence-event ([role : Role]) #:transparent)
(struct: absence-event ([role : Role] [reason : Reason]) #:transparent)
(struct: message-event ([role : Role] [message : Message]) #:transparent)
(define-type PresenceEvent presence-event)
(define-type AbsenceEvent absence-event)
(define-type MessageEvent message-event)
@ -58,7 +58,7 @@
;; Specification of a new process
(struct: process-spec ([boot : (PID -> CoTransition)])
#:prefab)
#:transparent)
(define-type ProcessSpec process-spec)
(define-type (PreAction State) (U (add-endpoint State)
@ -71,29 +71,29 @@
add-endpoint ([pre-eid : PreEID]
[role : Role]
[handler : (Handler State)])
#:prefab)
#:transparent)
(define-type (AddEndpoint State) (add-endpoint State))
(struct: delete-endpoint ([pre-eid : PreEID]
[reason : Reason])
#:prefab)
#:transparent)
(define-type DeleteEndpoint delete-endpoint)
(struct: send-message ([body : Message]
[orientation : Orientation])
#:prefab)
#:transparent)
(define-type SendMessage send-message)
(struct: (State)
spawn ([spec : process-spec]
[k : (Option (PID -> (InterruptK State)))]
[debug-name : Any])
#:prefab)
#:transparent)
(define-type (Spawn State) (spawn State))
(struct: quit ([pid : (Option PID)] ;; #f = suicide
[reason : Reason])
#:prefab)
#:transparent)
(define-type Quit quit)
(define-type (Action State) (U (PreAction State)
@ -102,12 +102,12 @@
(struct: (State)
yield ([k : (InterruptK State)])
#:prefab)
#:transparent)
(define-type (Yield State) (yield State))
(struct: (State)
at-meta-level ([preaction : (PreAction State)])
#:prefab)
#:transparent)
(define-type (AtMetaLevel State) (at-meta-level State))
(define-type PID Number)

View File

@ -48,7 +48,7 @@
(struct: eid ([pid : PID]
[pre-eid : PreEID])
#:prefab)
#:transparent)
(define-type Process (All (R) (CoProcess R) -> R))
(define-type (CoProcess R) (All (State) (process State) -> R))