   (:require [cats.core :as m]
             [cats.context :as mc]
             [cats.protocols :as mp]
+            [cats.util :as mutil]
             [promesa.protocols :as p]
             #?(:cljs [org.bluebird]))
   #?(:clj

     mp/Contextual
     (-get-context [_] promise-context)

     mp/Extract
     (-extract [it]
       (if (.isRejected it)

       (and (not (.isCompletedExceptionally it))
            (not (.isCancelled it))
            (not (.isDone it))))))

#?(:cljs (mutil/make-printable js/Promise)
   :clj (mutil/make-printable CompletionStage))

#?(:clj
   (extend-protocol p/IPromiseFactory
