added a comment - - edited
There is another case I would like to consider: specifying polymorphic ancestors. Currently ann-datatype/ann-record take an undocumented keyword argument :unchecked-ancestors.
(ann-protocol [[x :variance :invariant]] Foo
[(Foo x) -> x])
(ann-datatype DTFoo [m :- Any]
:unchecked-ancestors [(Foo String)])
(deftype DTFoo [m]
; this next line might read (Foo String), instead of :unchecked-ancestors entry
(-foo [this] "a"))
I will revisit this issue once I've ironed out how :unchecked-ancestors should work.