effekt-lang / effekt

A language with lexical effect handlers and lightweight effect polymorphism
https://effekt-lang.org
MIT License
334 stars 24 forks source link

Type aliases for computation types #650

Open jiribenes opened 1 month ago

jiribenes commented 1 month ago
effect emit(n: Int): Unit
type Stream = () => Unit / emit

is currently not possible as far as I can tell, since type expects its RHS to be a value type, but this RHS is a computation type. However, I'm not sure this restriction is necessary and would like to lift it.