From 5cb2d6d93e96002020477d2791d995e169751cf2 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Thu, 14 Jan 2016 06:42:11 -0800 Subject: [PATCH] accept regular hash for `hash->attrs` --- main.rkt | 2 +- tests.rkt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.rkt b/main.rkt index 84e3e55..601b384 100644 --- a/main.rkt +++ b/main.rkt @@ -229,7 +229,7 @@ (define+provide+safe (hash->attrs attr-hash) - (hash-eq? . -> . txexpr-attrs?) + (hash? . -> . txexpr-attrs?) (map (λ(k) (list k (hash-ref attr-hash k))) (hash-keys attr-hash))) diff --git a/tests.rkt b/tests.rkt index 1db6526..91ad340 100644 --- a/tests.rkt +++ b/tests.rkt @@ -124,7 +124,7 @@ (check-equal? (attrs->hash '((foo "bar")) '(foo "fraw")) '#hasheq((foo . "fraw"))) (check-equal? (attrs->hash '((foo "bar")) '(foo "fraw") 'foo "dog") '#hasheq((foo . "dog"))) - (check-equal? (apply set (hash->attrs '#hasheq((foo . "bar")(hee . "haw")))) + (check-equal? (apply set (hash->attrs '#hash((foo . "bar")(hee . "haw")))) (apply set '((foo "bar")(hee "haw")))) (check-equal? (attr-ref '(p ((foo "bar"))) 'foo) "bar")