             [clj-time.coerce :refer [to-date]]
             [clojure.string :as s]
             [clojure.java.io :refer [file reader]])
-  (:import [java.io File]))
+  (:import [java.io File]
+           [incise.parsers.parse Parse]))
 
 (defn- remove-trailing-index-html
   [path]
   (s/replace path #"/index\.html$" "/"))
 
-(defn Parse->path [parse]
+(defn Parse->path [^Parse parse]
   (->> parse
        (:path)
        (remove-trailing-index-html)

  the root, if it is a post it will be placed under a directory strucutre based
  on its date."
  [parser-fn]
  (fn [file]
    (let [parse (File->Parse parser-fn file)]
      (when (publish-parse? parse)
        (record-parse! (.getCanonicalPath file) parse)
        (delay [(write-Parse parse)])))))

    (try
      (edn/read-string s)
      (catch RuntimeException e
        (throw (ex-info (str "The given string seemed to start with a map, but "
                             "failed to be interpretted as edn.")
                        {:string s}
                        e))))))
