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

View File

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

View File

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

View File

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