effekt icon indicating copy to clipboard operation
effekt copied to clipboard

Existential types

Open phischu opened this issue 1 year ago • 2 comments

It would be great if we had existential types

type Packet {
   Wrap[E](x: E, E => E at {})
}

phischu avatar Mar 16 '23 14:03 phischu

Yes, this is somewhat related to #68 .

For the ml backend, this is difficult to support, though.

b-studios avatar Mar 16 '23 14:03 b-studios

@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]) }.

jiribenes avatar Mar 12 '24 16:03 jiribenes