Skip to content

Instantly share code, notes, and snippets.

View Milyardo's full-sized avatar

Zack Powers Milyardo

  • QOMPLX, Inc
  • Washington, DC
View GitHub Profile
type ShapeId = String //defined type alias ShapeId
type Hints = List[String] //defined type alias Hints
type Field[A] = (String, Schema[A]) //defined type alias Field
type Alt[U, A] = (String, Schema[A]) //defined type alias Alt
trait PolyF[F[_], G[_]] { //defined trait PolyF
def apply[A](fa: F[A]): G[A]
}
type ~>[F[_], G[_]] = PolyF[F, G] //defined type alias ~>
[error] /opt/workspace/de/scaloi/src/main/scala/scaloi/FreeHacks.scala:23: type parameter β defined in type Λ$ shadows type β defined in type Λ$. You may want to rename your type parameter, or possibly remove it.
[error] implicit def unapplyMMFA[TC[_[_]], M0[_[_], _], M1[_[_], _], F0[_], A0](implicit TC0: TC[M0[M1[F0,?], ?]]):
[error] /opt/workspace/de/scaloi/src/main/scala/scaloi/FreeHacks.scala:23: M1[F0,A] takes no type parameters, expected: one
[error] implicit def unapplyMMFA[TC[_[_]], M0[_[_], _], M1[_[_], _], F0[_], A0](implicit TC0: TC[Lambda[A => M0[M1[F0,A], A]]]):
[error] ^
@Milyardo
Milyardo / GeneratorPlugin.scala
Last active August 29, 2015 14:23
SBT Post compile source generator.
object GeneratorPlugin extends AutoPlugin {
object autoImport {
val generateSource = TaskKey[Seq[File]]("genmysources","Generates sources")
}
import autoImport._
lazy val MyGenerator = config("my-generator").extend(Compile)
override lazy val projectSettings = Seq[Def.Setting[_]](
ivyConfigurations += MyGenerator