Skip to content

Commit

Permalink
add contracts to structures
Browse files Browse the repository at this point in the history
  • Loading branch information
jbclements committed Jul 4, 2015
1 parent a1d577b commit c421fd9
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion osc/osc-defns.rkt
@@ -1,6 +1,26 @@
#lang racket

(provide (all-defined-out))

(provide (contract-out
(struct osc-message ([address (or/c bytes? (listof bytes?))]
[args (listof osc-value?)]))
(struct osc-bundle ([timestamp osc-date?]
[elements (listof osc-element?)]))
)
osc-element?
osc-date?
osc-double?
no-nul-bytes?
osc-symbol?
blob?
osc-char?
osc-color?
osc-midi?
osc-inf?
osc-array?
int32?
int64?
float32?)

;; an OSC-element is either an osc-message or an osc-bundle
(struct osc-message (address args) #:prefab)
Expand Down

0 comments on commit c421fd9

Please sign in to comment.