Where to find Scala output details?

I want to understand how type checking / algorithm works. It is very difficult, and there are many cases. Is there a good tutorial / documentation for this (I know the language specification, but IMO, this is too hard to read).

I just want to find out how Scala type output works under the hood.

+4
source share
1 answer

This is actually not very difficult. A very brief description can be found in section 16.9 of the Odersky / Spoon / Venners book “Programming in Scala” (1st edition, in the second edition, I think this is section 16.10):

http://www.artima.com/pins1ed/working-with-lists.html#16.9


So, if this is too simple, perhaps the following article will help you:

  • Vincent Creme, Francois Garilo, Sergey Längle and Martin Odersky, “Calculus of the Kernel for Testing the Scala Type”, in: “Lecture Notes in Computer Science,” 2006, Volume 4162/2006, 1-23, DOI: 10.1007 / 11821069_1 (Springer )

You can find the available PDF version through Google Scholar.


Or you can look at the sources of Scala 2.12.x at https://github.com/scala/scala/blob/2.12.x/src/compiler/scala/tools/nsc/typechecker/Infer.scala .

+4
source

All Articles