I hereby claim:
- I am juanjovazquez on github.
- I am juanjovazquez (https://keybase.io/juanjovazquez) on keybase.
- I have a public key ASA_XoOdzNnmX2_GFOJ-PXZKlDlhZg6iuTiQGYNIGTdq-Ao
To claim this, I am signing this object:
package polycol | |
object Displays { | |
import PolyCol.* | |
opaque type Display = String | |
object Display { | |
def apply[A: Printer](a: A): Display = a.print | |
} |
// Regular class | |
final case class Field0[L <: String & Singleton, V](label: L, value: V) |
package polyMap | |
type Id[T] = T | |
trait Negation[A]: | |
def neg(a: A): A | |
object Negation: | |
def apply[A](using ev: Negation[A]): Negation[A] = ev |
type Negate[X] = X match | |
case String => String | |
case Int => Int | |
case Boolean => Boolean | |
def negate[A](a: A): Negate[A] = a match | |
case x: String => s"no-$x" | |
case x: Int => -x | |
case x: Boolean => !x | |
// For educational purposes | |
object MyListModule { | |
trait MyList[+A] | |
object MyList { | |
case object Empty extends MyList[Nothing] | |
case class Cons[A](h: A, t: MyList[A]) extends MyList[A] | |
def head[A](l: MyList[A]): A = |
object labelled { | |
opaque type Field[K <: String, +V] = V | |
object Field { | |
def apply[K <: String, V](v: V): Field[K, V] = v | |
extension on [K <: String, V](field: Field[K, V]) { | |
def value: V = field | |
} | |
} |
I hereby claim:
To claim this, I am signing this object:
// This is an ammonite scala script see: http://bit.ly/2FyQf58 | |
// Dependencies | |
import $ivy.`org.typelevel::cats-core:1.0.1` | |
import $ivy.`com.chuusai::shapeless:2.3.3` | |
import $ivy.`io.frees::iota-core:0.3.4` | |
import $ivy.`org.scalacheck::scalacheck:1.13.5` | |
// Regular imports | |
import iota.{ Cop, TNil } |
import cats.~> | |
import cats.data.State | |
import cats.syntax.all._ | |
import org.atnos.eff.{ |=, <=, Eff, Fx, Member } | |
import org.atnos.eff.state.get | |
import org.atnos.eff.either.fromEither | |
import org.atnos.eff.Eff.send | |
import org.atnos.eff.Interpret.translateNat | |
import org.atnos.eff.syntax.all._ |
object RaptureXmlOk { | |
import rapture.xml._ | |
case class Foo(bar: Bar) | |
case class Bar(baz: Baz) | |
case class Baz(qux: Qux) | |
case class Qux(value: String) | |
implicitly[Extractor[Bar, Xml]] // works | |
implicitly[Extractor[Foo, Xml]] // works |