mvv / typine   0.1-M4

GitHub

Type inequality witnesses for Scala

Typine

Release Version Snapshot Version Build Status

Type inequality witnesses for Scala. A witness A !:= B guarantees that A and B are different types, taking into account possible instantiations of type parameters inside those types. For example,

def f[A] = summon[A !:= Int]

will fail to compile, but both

def f[A] = summon[Either[A, String] !:= Either[Int, Char]]
def f[A, B](using A !:= B) = summon[Option[A] !:= Option[B]]

will be accepted.

Using Typine in your project

Add Typine to your dependencies

libraryDependencies += "com.github.mvv.typine" %% "typine" % "0.1-M4"