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

Unions between polymorphic variants behind module types

$
0
0

well you could use the same technique with module functions but it’s rather similar:

module type T = {
  type t
}

module Make = (A: T with type t = [#a], B: T with type t = [#b]) => {
  type t = [A.t | B.t]
}

module C = Make(
  {
    type t = [#a]
  },
  {
    type t = [#b]
  },
)

What problem are you trying to solve?


Viewing all articles
Browse latest Browse all 2592

Trending Articles