effekt
effekt copied to clipboard
Existential types
It would be great if we had existential types
type Packet {
Wrap[E](x: E, E => E at {})
}
Yes, this is somewhat related to #68 .
For the ml backend, this is difficult to support, though.
@Jonaskr8 ran into this issue recently when working on his thesis, wanting to have a List[forall A. Var[A]]
which is also expressible as List[Var[_]]
in Scala or possibly as List[SomeVar]
where SomeVar
is an existential wrapper -- type SomeVar { SomeVar[A](var: Var[A]) }
.