Skip to content

Commit

Permalink
tighten up spec contract
Browse files Browse the repository at this point in the history
  • Loading branch information
benknoble committed Oct 19, 2024
1 parent b6751e7 commit b051174
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aoe-images.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
(~> pict-width (* max-col)))
max (* 3/2)))

;; TODO: use struct/contract?
(struct line [number dedent? columns] #:prefab)
;; shape: spec-sym?
(struct column [shape number] #:prefab)
Expand Down Expand Up @@ -153,7 +152,8 @@
(and (syntax-line stx)
(spec-sym? (syntax-e stx)))))

(define spec? (listof line?))
(define spec?
(listof (struct/c line exact-positive-integer? boolean? (listof (struct/c column spec-sym? natural-number/c)))))

(define string->spec
{~>> open-input-string
Expand Down

0 comments on commit b051174

Please sign in to comment.