Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 1770

Type level function for tracking observable behavior

$
0
0

You want HKT or dependent type?

I think there’s no way to model it fully, so I’ll quickly compromise.

If you can accept adding some runtime for it then may be possible to manage the transformation explicitly by introducing GADT like


type rec kind<t> =
  | Int_val(int): kind<value<int>>
  | ...

My guess is that merging an observable means you’ll eventually need a tag in the observer. It makes sense to have a runtime.


Viewing all articles
Browse latest Browse all 1770

Trending Articles