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?