What is the meaning of * in the tests?

71 Views Asked by At

In the tests of cats, * occurs as a type parameter, for example, here:

checkAll("Nested[Eval, List, *]", DeferTests[Nested[Eval, List, *]].defer[Int])

(See https://github.com/typelevel/cats/blob/master/tests/src/test/scala/cats/tests/NestedSuite.scala#L19)

I know that the compiler translates it to a type level function, but why? Where is it defined? Is it part of the language specification or part of cats (or one of it's dependencies)?

1

There are 1 best solutions below

0
Dmytro Mitin On BEST ANSWER

It's kind-projector compiler plugin that translates types with stars to type lambdas

https://github.com/typelevel/kind-projector

Former syntax was with question marks, current one is with stars.