Skip to content

Instantly share code, notes, and snippets.

@milessabin
Forked from justjoheinz/coproducttest.scala
Last active September 8, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milessabin/31d1919b22627fec103d to your computer and use it in GitHub Desktop.
Save milessabin/31d1919b22627fec103d to your computer and use it in GitHub Desktop.
import shapeless._
import ops._
import coproduct._
object coproducttest {
type U = Int :+: String :+: CNil
type V = Double :+: List[Int] :+: CNil
val p = Prepend[U,V]
type W = p.Out
val i : Int = 1
// compiles ...
val z = Coproduct[W](i)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment