    ))
 
 (defn read-type
+  "Read from the minibuffer but of a particular type. Basically Minibuffer.Read<T>().
+
+(then (read-type Int64 \"How old are you?\")
+      #(message \"%d is a fine age.\" %))
+"
   [type prompt & {:keys [input history completer require-match require-coerce]
                   :or {input "" history nil completer nil
                        require-match false require-coerce false}}]


;; Generic
(defn then
  "Given a RSG.IPromise<T> run (f result-value) when the promise resolves."
  [ipromise f]
  (let [ptype (type ipromise)
       of-type (.GetGenericArguments ptype)
       atype (eval `(generate-generic-type Action ~of-type))
       meth (.GetMethod ptype "Then" (into-array Type [atype]))
       arg #_(eval `(sys-action ~(apply vector of-type) [~'s] (~f ~'s)))
       (. clojure.lang.GenDelegate Create atype f)
       ]
       (.Invoke meth ipromise (into-array Object [arg]))))

(defn pcatch
  "Given an RSG.IPromise p, if p is rejected, run (f e) where e is the

            (.set_Item (.completers Minibuffer/instance) name c)
            c))

(def symbol-completer-exclude-namespaces
     (atom ['clojure.core 'clojure.repl]))

(defn make-symbol-completer
  "Create a symbol completer. Accepts a filter function that will take a
