diff --git a/quad/quads-typed.rkt b/quad/quads-typed.rkt index 06c6ab8f..eba8c0a7 100644 --- a/quad/quads-typed.rkt +++ b/quad/quads-typed.rkt @@ -19,6 +19,8 @@ (define-type QuadAttrValue Any) (define-predicate QuadAttrValue? QuadAttrValue) (define-type QuadAttrs (HashTable QuadAttrKey QuadAttrValue)) +(define-type HashableList (All (A) (Rec duo (U Null (List* QuadAttrKey A duo))))) + (: quad-attrs? (Any . -> . Boolean)) (define (quad-attrs? x) diff --git a/quad/utils-typed.rkt b/quad/utils-typed.rkt index 59e8e802..fc6d3490 100644 --- a/quad/utils-typed.rkt +++ b/quad/utils-typed.rkt @@ -16,9 +16,8 @@ ;; push together multiple attr sources into one list of pairs. ;; mostly a helper function for the two attr functions below. -(: join-attrs ((Listof (U Quad QuadAttrs)) . -> . QuadAttrs)) +(: join-attrs ((Listof (U Quad QuadAttrs HashableList)) . -> . QuadAttrs)) (define (join-attrs quads-or-attrs-or-lists) -; (list-of-mergeable-attrs? . -> . pairs?) (append-map hash->list (filter-not false? (map (λ(x) (cond [(quad? x) (quad-attrs x)]