core-typed

Typed Clojure, an optional type system for Clojure
p 2020-06-02T23:05:57.011700Z

Hi, out of curiosity, how you would express the following in Typed Clojure?

data T
   = A Float
   | B String
   | C Int Int
  deriving (Eq)
So far I've come up with:
(ann-datatype A [f :- Float])
(deftype A [f])

(ann-datatype B [s :- String])
(deftype B [s])

(ann-datatype C [x :- Int, y :- Int])
(deftype C [x y])

(defalias T (U A B C))