Skip to content

Commit

Permalink
maintain Location as struct type
Browse files Browse the repository at this point in the history
  • Loading branch information
joergen7 authored and samth committed Jan 3, 2025
1 parent 4bd8d9e commit a01eb21
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions typed-racket-more/typed/xml.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,15 @@
(Pair Symbol (Pair (Listof XExpr-Attribute) (Listof XExpr)))
(Pair Symbol (Listof XExpr))))

(require/typed xml
(require/typed/provide xml
[#:struct location
([line : (U False Exact-Nonnegative-Integer)]
[char : (U False Exact-Nonnegative-Integer)]
[offset : Exact-Nonnegative-Integer])])

(define-type Location
(U location Symbol False))

(require/typed/provide xml
[offset : Exact-Nonnegative-Integer])
#:type-name Location]
[#:struct source
([start : Location]
[stop : Location])
([start : (U Location Symbol False)]
[stop : (U Location Symbol False)])
#:type-name Source]
[#:struct external-dtd
([system : String])
Expand Down

0 comments on commit a01eb21

Please sign in to comment.