Fork me on GitHub
#clojure-spec
<
2017-05-07
>
reefersleep19:05:37

Is there an easy way to refer to a registered spec under a different name in a map spec?

taylor23:05:21

@U0AQ3HP9U if I understand your question, I don't think there is and I also think that's by design

Alex Miller (Clojure team)23:05:47

no, other than by using :req-un for a spec with the same name but different namespace in s/keys

reefersleep13:05:12

Thank you @U3DAE8HMG and @U064X3EF3 for your succinct answers!

caio22:05:26

is there an easy way of defining spec for something inside a ref?

caio22:05:47

I'm trying to write a spec for funcool cats' either monad, but no luck

caio22:05:12

I was able to write something to conform/unform, but got stuck when trying to write a proper generator

Alex Miller (Clojure team)23:05:13

possibly will be added in the future