Fork me on GitHub
#core-typed
<
2020-06-02
>
p23:06:57

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))