Closed
Description
Based on the following two scenarios causing errors:
Repro 1
module type T = {
type t
}
@react.component
let make = (type a, ~foo: module(T with type t = a)) => {
module T = unpack(foo)
<div />
}
yields the error:
[E] Line 7, column 13:
The type of this packed module contains variables:
module(T with type t = 'type-a0)
Repro 2
module type T = {
type t
}
@react.component
let make = (type a, ~foo) => {
module T = unpack(foo: T with type t = a)
<div />
}
yields the error:
[E] Line 7, column 41:
This type constructor, `a`, can't be found.
If you wanted to write a recursive type, don't forget the `rec` in `type rec`