Skip to content

Instantly share code, notes, and snippets.

View sbt-isDotty.scala
val isScala3Setting = Def.setting {
isScala3(CrossVersion.partialVersion(scalaVersion.value))
}
def isScala3(v: Option[(Long, Long)]): Boolean = v.exists(_._1 != 2)
View ApplyConverterInstances.scala
package app.tulz.tuplez
trait ApplyConverterInstancesPriLow[O] {
implicit def singleParam[T1]: ApplyConverter[T1, O] { type In = (T1) => O } = new ApplyConverter[T1, O] {
type In = T1 => O
def apply(fn: T1 => O): T1 => O = fn
}
}
trait ApplyConverterInstances[O] extends ApplyConverterInstancesPriLow[O] {
View ApplyConverter.scala
package app.tulz.tuplez
abstract class ApplyConverter[L, O] {
type In
def apply(f: In): L => O
}
trait ApplyConverters[O] extends ApplyConverterInstances[O]
View FileToLiteral.scala
import java.io.File
import scala.reflect.macros.blackbox
object FileToLiteral {
def apply(fileName: String): String = macro FileToLiteralImpl.referEmbeddedFile
}
class FileToLiteralImpl(val c: blackbox.Context) {
View EmbeddedFilesGenerator.scala
import sbt._
import sbt.Keys._
import sbt.KeyRanks._
import java.nio.file.Files
import java.nio.file.Path
import sbt.nio._
import sbt.nio.Keys._
object EmbeddedFilesGenerator extends AutoPlugin {
View full-light.scala
package app.tulz.tuplez
object TupleComposition {
def compose[L, R](l: L, r: R)(implicit composition: Composition[L, R]): composition.Composed = composition.compose(l, r)
}
abstract class Composition[-A, -B] {
type Composed
View full.scala
package app.tulz.tuplez
object TupleComposition {
def compose[L, R](l: L, r: R)(implicit composition: Composition[L, R]): composition.Composed = composition.compose(l, r)
}
abstract class Composition[-A, -B] {
type Composed
View basic.scala
package app.tulz.tuplez
object TupleComposition {
def compose[L, R](l: L, r: R)(implicit composition: Composition[L, R]): composition.Composed = composition.compose(l, r)
}
abstract class Composition[-A, -B] {
type Composed
View basic-light.scala
package app.tulz.tuplez
object TupleComposition {
def compose[L, R](l: L, r: R)(implicit composition: Composition[L, R]): composition.Composed = composition.compose(l, r)
}
abstract class Composition[-A, -B] {
type Composed
View keybase.md

Keybase proof

I hereby claim:

  • I am yurique on github.
  • I am yurique (https://keybase.io/yurique) on keybase.
  • I have a public key ASByNPSkaWzSlemZZGmY1y-ER-E9Ee1pMHMce92xyCnk4Ao

To claim this, I am signing this object: