|
|
@ -2,7 +2,8 @@
|
|
|
|
(require (for-syntax racket/base racket/syntax))
|
|
|
|
(require (for-syntax racket/base racket/syntax))
|
|
|
|
(require/typed sugar/list [slicef-after ((Listof Quad) (Quad . -> . Boolean) . -> . (Listof (Listof Quad)))]
|
|
|
|
(require/typed sugar/list [slicef-after ((Listof Quad) (Quad . -> . Boolean) . -> . (Listof (Listof Quad)))]
|
|
|
|
[shift ((Listof Any) (Listof Integer) . -> . (Listof Any))])
|
|
|
|
[shift ((Listof Any) (Listof Integer) . -> . (Listof Any))])
|
|
|
|
(require math/flonum racket/list)
|
|
|
|
(require math/flonum (except-in racket/list flatten))
|
|
|
|
|
|
|
|
(require/typed racket/list [flatten (All (A) (Rec as (U Any (Listof as))) -> (Listof Any))])
|
|
|
|
(require "ocm-typed.rkt" "quads-typed.rkt" "utils-typed.rkt" "measure-typed.rkt" "world-typed.rkt" "logger-typed.rkt")
|
|
|
|
(require "ocm-typed.rkt" "quads-typed.rkt" "utils-typed.rkt" "measure-typed.rkt" "world-typed.rkt" "logger-typed.rkt")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -252,16 +253,13 @@
|
|
|
|
(foldl (λ(k [ht : HashTableTop]) (hash-remove ht k)) (quad-attrs attr-source) keys-to-ignore)) QuadAttrs))
|
|
|
|
(foldl (λ(k [ht : HashTableTop]) (hash-remove ht k)) (quad-attrs attr-source) keys-to-ignore)) QuadAttrs))
|
|
|
|
(quad (quad-name q) (merge-attrs filtered-hash q) (quad-list q)))
|
|
|
|
(quad (quad-name q) (merge-attrs filtered-hash q) (quad-list q)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(quad (quad-name line)
|
|
|
|
#|
|
|
|
|
(quad-attrs line)
|
|
|
|
|
|
|
|
(cast (flatten (let ([qs (cast (quad-list line) (Listof Quad))])
|
|
|
|
(quad (quad-name line) (quad-attrs line) (flatten (let ([qs : (Listof Quad) (quad-list line)])
|
|
|
|
`(,@(cast (if before (copy-with-attrs before (first qs)) null) (Listof Quad))
|
|
|
|
`(,@(if before (copy-with-attrs before (first qs)) null)
|
|
|
|
,@(map (λ([q : Quad]) (if (and middle (takes-justification-space? q))
|
|
|
|
|
|
|
|
|
|
|
|
,@(map (λ(q) (if (and middle (takes-justification-space? q))
|
|
|
|
|
|
|
|
(let ([interleaver (copy-with-attrs middle q)])
|
|
|
|
(let ([interleaver (copy-with-attrs middle q)])
|
|
|
|
(list interleaver q interleaver))
|
|
|
|
(list interleaver q interleaver))
|
|
|
|
q)) qs)
|
|
|
|
q)) qs)
|
|
|
|
,@(if after (copy-with-attrs after (last qs)) null)))))
|
|
|
|
,@(cast (if after (copy-with-attrs after (last qs)) null) (Listof Quad))
|
|
|
|
|#
|
|
|
|
))) QuadList)))
|
|
|
|
line)
|
|
|
|
|
|
|
|