New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infer spec #2

Open
wants to merge 1 commit into
base: infer-spec-base
from
Jump to file or symbol
Failed to load files and symbols.
+73 −1
Diff settings

Always

Just for now

@@ -1,6 +1,78 @@
(ns slingshot.slingshot
(:require [slingshot.support :as s]))
;; Automatically added requires by core.typed
(require '[clojure.spec.alpha :as spc])
;; Start: Generated by clojure.core.typed - DO NOT EDIT
(spc/def
:clojure.core.typed.unqualified-keys/cause
(spc/or
:clojure.lang.ExceptionInfo
(partial instance? clojure.lang.ExceptionInfo)
:java.lang.Exception
(partial instance? java.lang.Exception)))
(spc/def :clojure.core.typed.unqualified-keys/throwable (spc/or))
(spc/def
:clojure.core.typed.unqualified-keys/object
(spc/or
:int?
int?
:string?
string?
:java.lang.Exception
(partial instance? java.lang.Exception)
:java.lang.Object
(partial instance? java.lang.Object)))
(spc/def :clojure.core.typed.unqualified-keys/wrapper (spc/or))
(spc/def :clojure.core.typed.unqualified-keys/message string?)
(spc/def :clojure.core.typed.unqualified-keys/stack-trace (spc/or))
(spc/def
::CauseMessageObjectMap
(spc/keys
:req-un
[:clojure.core.typed.unqualified-keys/cause
:clojure.core.typed.unqualified-keys/message
:clojure.core.typed.unqualified-keys/object
:clojure.core.typed.unqualified-keys/stack-trace
:clojure.core.typed.unqualified-keys/throwable]
:opt-un
[:clojure.core.typed.unqualified-keys/wrapper]))
(spc/fdef
get-throw-context
:args
(spc/cat
:t
(spc/or
:clojure.lang.ExceptionInfo
(partial instance? clojure.lang.ExceptionInfo)
:java.lang.RuntimeException
(partial instance? java.lang.RuntimeException)
:java.lang.Exception
(partial instance? java.lang.Exception)))
:ret
::CauseMessageObjectMap)
(spc/fdef
get-thrown-object
:args
(spc/cat
:t
(spc/or
:clojure.lang.ExceptionInfo
(partial instance? clojure.lang.ExceptionInfo)
:java.lang.RuntimeException
(partial instance? java.lang.RuntimeException)
:java.lang.Exception
(partial instance? java.lang.Exception)))
:ret
(spc/or
:string?
string?
:java.lang.Exception
(partial instance? java.lang.Exception)
:java.lang.Object
(partial instance? java.lang.Object)))
(spc/fdef try+ :args (spc/cat :body (spc/* any?)) :ret any?)
;; End: Generated by clojure.core.typed - DO NOT EDIT
(defmacro try+
"Like the try special form, but with enhanced catch clauses and an
optional else clause:
@@ -147,4 +219,4 @@
See also get-throw-context"
[t]
(-> t get-throw-context :object))
(-> t get-throw-context :object))
ProTip! Use n and p to navigate between commits in a pull request.