From 88600643de1eada6c503dec90c8817cd7404ed8e Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Fri, 28 Feb 2014 20:18:09 -0800 Subject: [PATCH] remove dependencies --- cache.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cache.rkt b/cache.rkt index 7889116..4e7dc05 100644 --- a/cache.rkt +++ b/cache.rkt @@ -1,6 +1,5 @@ #lang racket/base (require racket/rerequire) -(require "debug.rkt" sugar/coercion/values) ;; The cache is a hash with paths as keys. ;; The cache values are also hashes, with key/value pairs for that path. @@ -13,6 +12,9 @@ (define (make-cache) (make-hash)) +(define (->complete-path path-string) + (path->complete-path (if (string? path-string) (string->path path-string) path-string))) + (define (cache-ref path-string) (hash-ref (current-cache) (->complete-path path-string))) @@ -28,7 +30,6 @@ (hash-set! cache-hash 'metas (dynamic-require path 'metas)) (void)) - (define (cached-require path-string key) (when (not (current-cache)) (error "cached-require: No cache set up."))