effekt-lang / effekt-lang/effekt
Type omission for computation literals with higher-rank-poly
- Dominant language
- Scala
- Stars
- 469
- Forks
- 41
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 23
Description
## Description
Currently, it is possible to omit parameter types for computation literals like in this (minimal) example
```scala
def f() { g: Int => Int }: Int = g(42)
// ...
f { a => a + 1 }
// equals
f { (a: Int) => a + 1 }
```
However, with the proper implementation of higher-rank-polymorphism in #246, it should also be possible to omit the type parameter and parameter type:
```scala
def h() { g: [A](A) => A }: Unit = { g(42); () }
// ...
h { a => a } // error: Wrong number of type arguments, given 0, but function expects 1.
h { [A](a: A) => a } // checks out
```
We should investigate, whether this can be made possible.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.