I am using custom Predef
with -Yno-predef
flag. It is basically a copy of SlamData's one.
When I try to flatten nested immutable Seq
s collections I receive error:
No implicit view available from my.Predef.Seq[String] => scala.collection.GenTraversableOnce[String].
If I put import scala.Predef._
it will compile again. I tried to investigate scala.Predef
and scala
package object but when I tried to copy TraversableOnce
's, Traversable
's or Seq
's definitions it didn't help.
Do someone know which part of vanilla predef is responsible for generating this implicit?
You are looking for
Predef.$conforms
.A way to figure it out is to run
scala -Xprint:typer -e 'Seq(Seq(1)).flatten'
on the command line. It'll print the entire syntax tree, with all implicits resolved.