Merge pull request #1467 from sbt/wip/eviction-warning

Eviction warnings (Fixes #1200)
This commit is contained in:
Josh Suereth 2014-07-29 11:08:42 -04:00
commit e1d79ec27a
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
package sbt
trait ShowLines[A] {
def showLines(a: A): Seq[String]
}
object ShowLines {
def apply[A](f: A => Seq[String]): ShowLines[A] =
new ShowLines[A] {
def showLines(a: A): Seq[String] = f(a)
}
implicit class ShowLinesOp[A: ShowLines](a: A) {
def lines: Seq[String] = implicitly[ShowLines[A]].showLines(a)
}
}