core-typed

Tony Morris 2023-08-02T06:10:43.217259Z

Hello, how would I annotated a data type (`ann-datatype`) which has an argument using a rank-type:

; Haskell equivalent
; data Either a b = Either { unwrap :: forall x. (a -> x) -> (b -> x) -> x }
(defrecord Either [unwrap])

2023-08-07T00:31:36.550899Z

Perhaps something like this:

(t/ann-record [[a :variance :covariant]
               [b :variance :covariant]]
              Either
              [unwrap :- (t/All [x] [[a :-> x] [b :-> x] :-> x])])

Tony Morris 2023-08-09T04:25:08.047449Z

oh nice thanks!