Created
August 13, 2013 13:10
-
-
Save frenchy64/6220921 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ann ^:no-check add-datatype-ancestors [Symbol (t/Set r/TCType) -> nil]) | |
(defn add-datatype-ancestors | |
"Add a set of ancestor overrides for the datatype named sym." | |
[sym tset] | |
(assert-dt-ancestors) | |
(when-let-fail [a *current-dt-ancestors*] | |
(swap! a update-in [sym] #(set/union (or % #{}) tset))) | |
nil) | |
(defn ^:no-check ^{:ann '[Symbol (t/Set r/TCType) -> nil]} | |
add-datatype-ancestors | |
"Add a set of ancestor overrides for the datatype named sym." | |
[sym tset] | |
(assert-dt-ancestors) | |
(when-let-fail [a *current-dt-ancestors*] | |
(swap! a update-in [sym] #(set/union (or % #{}) tset))) | |
nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment