From 67dba5444bd52fb51ab679c87ccf98f2b7c08a0b Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 22 Dec 2014 17:17:05 -0500 Subject: [PATCH] Prefab structs for everything --- rmacs/buffer.rkt | 4 ++-- rmacs/diff.rkt | 2 +- rmacs/display.rkt | 2 +- rmacs/editor.rkt | 2 +- rmacs/rope.rkt | 6 +++--- rmacs/window.rkt | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rmacs/buffer.rkt b/rmacs/buffer.rkt index eff431d..8135c84 100644 --- a/rmacs/buffer.rkt +++ b/rmacs/buffer.rkt @@ -38,13 +38,13 @@ (define main-mark-type (mark-type "main" 'right)) (struct buffergroup ([members #:mutable] ;; (CircularList Buffer) - ) #:transparent) + ) #:prefab) (struct buffer ([rope #:mutable] [pos #:mutable] [title #:mutable] [group #:mutable] ;; (Option BufferGroup) - ) #:transparent) + ) #:prefab) (define (make-buffergroup) (buffergroup circular-empty)) diff --git a/rmacs/diff.rkt b/rmacs/diff.rkt index 24eca73..e3ea203 100644 --- a/rmacs/diff.rkt +++ b/rmacs/diff.rkt @@ -14,7 +14,7 @@ (item xs)] (hash-set classes item (set-add (hash-ref classes item (lambda () (set))) i)))) -(struct candidate (x-index y-index chain) #:transparent) +(struct candidate (x-index y-index chain) #:prefab) (define (longest-common-subsequence xs ys) (define ys-equivalence-classes (equivalence-classes ys)) diff --git a/rmacs/display.rkt b/rmacs/display.rkt index 36e8a40..6f1531c 100644 --- a/rmacs/display.rkt +++ b/rmacs/display.rkt @@ -37,7 +37,7 @@ [background-color #:mutable] ;; Nat [bold? #:mutable] ;; Boolean [italic? #:mutable] ;; Boolean - ) #:transparent) + ) #:prefab) (define (tty-last-row t) (- (tty-rows t) 1)) (define (tty-last-column t) (- (tty-columns t) 1)) diff --git a/rmacs/editor.rkt b/rmacs/editor.rkt index 928247a..8fc0854 100644 --- a/rmacs/editor.rkt +++ b/rmacs/editor.rkt @@ -14,7 +14,7 @@ (struct editor (buffers ;; BufferGroup [windows #:mutable] ;; (List (List Window SizeSpec)), abstract window layout [active-window #:mutable] ;; (Option Window) - ) #:transparent) + ) #:prefab) (define (make-editor) (define g (make-buffergroup)) diff --git a/rmacs/rope.rkt b/rmacs/rope.rkt index e49878f..a5b55a6 100644 --- a/rmacs/rope.rkt +++ b/rmacs/rope.rkt @@ -50,11 +50,11 @@ ;; A MarkType is a (mark-type String Stickiness). MarkTypes can be ;; associated with a set of Any values at each position in the rope. -(struct mark-type (name stickiness) #:transparent) +(struct mark-type (name stickiness) #:prefab) ;; A Strand is a (strand String Number Number), representing a ;; substring of a string. -(struct strand (text offset count) #:transparent) +(struct strand (text offset count) #:prefab) ;; A Rope is a splay tree representing a long piece of text. ;; #f is the empty Rope; otherwise a (rope) struct instance. @@ -65,7 +65,7 @@ size* ;; Number, total length of this rope marks* ;; (Seteq MarkType) mark-index ;; (Hasheq MarkType (Hash Number (Set Any))), marks in this span - ) #:transparent) + ) #:prefab) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Strands diff --git a/rmacs/window.rkt b/rmacs/window.rkt index aa8a899..b3f60b4 100644 --- a/rmacs/window.rkt +++ b/rmacs/window.rkt @@ -20,7 +20,7 @@ (struct window (id ;; Symbol [buffer #:mutable] ;; Buffer - ) #:transparent) + ) #:prefab) (define (make-window initial-buffer) (window (gensym 'window)