~remexre/sylvan#5: 
Role system

Right now, Coercible/~>/.coerce only works for wrapping and unwrapping newtypes.

For it to be really useful (like, deserving-of-its-syntax useful), it should also allow coercing e.g. Seq[Int] to Seq[NewtypeForInt].

This will require a bunch of changes; we'll need to put ~> instances into the IR and have coerce there. We'll also need to perform the actual analysis to determine what roles a type's tyargs should have; this is a "traverse all the types in SCC order" check, though we already have the plumbing for that.

Status
RESOLVED CLOSED
Submitter
~remexre
Assigned to
No-one
Submitted
1 year, 6 months ago
Updated
3 months ago
Labels
C: lang enhancement