Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. boot.user=> (ns foo (:refer-clojure :as [rand-int]))
  2.  
  3. clojure.lang.Compiler$CompilerException: clojure.lang.ExceptionInfo: Call to clojure.core/refer-clojure did not conform to spec:
  4. In: [0 1] val: :as fails at: [:args :exclude :op :quoted-spec :spec] predicate: #{:exclude}
  5. In: [0 1] val: :as fails at: [:args :only :op :quoted-spec :spec] predicate: #{:only}
  6. In: [0 1] val: :as fails at: [:args :rename :op :quoted-spec :spec] predicate: #{:rename}
  7. In: [0] val: (quote :as) fails at: [:args :exclude :op :spec] predicate: #{:exclude}
  8. In: [0] val: (quote :as) fails at: [:args :only :op :spec] predicate: #{:only}
  9. In: [0] val: (quote :as) fails at: [:args :rename :op :spec] predicate: #{:rename}
  10. :clojure.spec.alpha/spec #object[clojure.spec.alpha$regex_spec_impl$reify__1200 0x7b34e158 "clojure.spec.alpha$regex_spec_impl$reify__1200@7b34e158"]
  11. :clojure.spec.alpha/value ((quote :as) (quote [rand-int]))
  12. :clojure.spec.alpha/args ((quote :as) (quote [rand-int]))
  13. #:clojure.spec.alpha{:problems ({:path [:args :exclude :op :spec], :pred #{:exclude}, :val (quote :as), :via [], :in [0]} {:path [:args :exclude :op :quoted-spec :spec], :pred #{:exclude}, :val :as, :via [], :in [0 1]} {:path [:args :only :op :spec], :pred #{:only}, :val (quote :as), :via [], :in [0]} {:path [:args :only :op :quoted-spec :spec], :pred #{:only}, :val :as, :via [], :in [0 1]} {:path [:args :rename :op :spec], :pred #{:rename}, :val (quote :as), :via [], :in [0]} {:path [:args :rename :op :quoted-spec :spec], :pred #{:rename}, :val :as, :via [], :in [0 1]}), :spec #object[clojure.spec.alpha$regex_spec_impl$reify__1200 0x7b34e158 "clojure.spec.alpha$regex_spec_impl$reify__1200@7b34e158"], :value ((quote :as) (quote [rand-int])), :args ((quote :as) (quote [rand-int]))}, compiling:(/var/folders/42/zcfb2hds38l3shl7lqnjw2gh0000gp/T/boot.user8397969512473900026.clj:1:1)
  14.  
  15. with expound
  16.  
  17. boot.user=> (require '[expound.alpha :as expound])
  18. nil
  19. boot.user=> (require '[expound.alpha :as expound])
  20. nil
  21. boot.user=> (require '[clojure.spec.alpha :as s])
  22. nil
  23. boot.user=> (set! s/*explain-out* expound/printer)
  24. #object[expound.alpha$printer 0x694ea272 "expound.alpha$printer@694ea272"]
  25. boot.user=> (ns foo (:refer-clojure :as [rand-int]))
  26.  
  27. clojure.lang.Compiler$CompilerException: clojure.lang.ExceptionInfo: Call to clojure.core/refer-clojure did not conform to spec:
  28. -- Spec failed --------------------
  29.  
  30. ((... :as) ...)
  31. ^^^
  32.  
  33. should be: `:exclude`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement