From 4d254fe9123d09159ab983883d022b808d0d1618 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sat, 31 Jan 2015 23:00:57 -0800 Subject: [PATCH] still --- quad/quads-typed.rkt | 2 ++ quad/utils-typed.rkt | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) 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)]