        (refer '~'compojure)))
 
 (def #^{:private true}
-  *loaded-files* nil)
+  *loaded-paths* #{})
 
 (defn require
   "Load the file if and only if it has not been loaded previously."
   [file]
-  (when-not (includes? file *loaded-files*)
-    (def *loaded-files*
-      (cons file *loaded-files*))
-    (load-file file)
-    true))
+  (let [path (. (new File file) (getCanonicalPath))]
+    (when-not (contains? *loaded-paths* path)
+      (def *loaded-paths*
+        (conj *loaded-paths* path))
+      (load-file path)
+      true)))
 
 (defmacro return
   "A do block that will always return the argument x."


(defn glob
  "Find all files in a directory matching a glob."
  ([pattern]
    (glob pattern "."))
  ([pattern path]
    (glob-parts (split-path pattern) (file path))))

(defn load-glob
  "Load all files matching a glob."


(defn file
  "Returns an instance of java.io.File."
  ([name]          (new File name))
  ([parent name]   (new File parent name))
  ([p q & parents] (reduce file (file p q) parents)))

(defn pipe-stream
