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

Unions between polymorphic variants behind module types

$
0
0

in rescript, there’s no way to express the fact that a type is of the kind of a generic variant, record, or polymorphic variant.

It’d be hard to implement anyway because in such cases, if you have no additional information on A.t or B.t, the compiler can’t know if there’s no overlapping variants between A.t and B.t when creating C.t for example :

module C = {
  type t = [A.t | B.t]
}

Viewing all articles
Browse latest Browse all 2592

Trending Articles