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

Unions between polymorphic variants behind module types

$
0
0

experimenting a bit more, i think this is just something that hasn’t been implemented in the compiler’s type inference:

module type T = {
  let foo: unit => [> #x]
}

module A: T = {
  let foo: unit => [> #x] = (): [#a | #x] => #a
}

this hampers composability of module functions but i guess it’ just not possible right now?


Viewing all articles
Browse latest Browse all 2592

Trending Articles