trait Demixin[ConjunctionType] extends AnyRef
A type class that converts a mix-in type to shapeless.HList.
Common imports
You may want to use Demixin with shapeless.HList.
import shapeless._ import org.scalatest.Matchers._
- Source
- Demixin.scala
The Demixin type class can be summoned from Demixin.apply method:
class A; trait B; object C; val demixin = Demixin[A with B with C.type with String with Int]
Out should be a shapeless.HList of each type components in the mix-in type
ConjunctionType
."implicitly[demixin.Out =:= (A :: B :: C.type :: String :: Int :: HNil)]" should compile
The elements in Out should keep the same order as type components in
ConjunctionType
."implicitly[demixin.Out =:!= (String :: A :: B :: C.type :: Int :: HNil)]" should compile
, Out of Demixin on scala.Any should be shapeless.HNil
val demixin = Demixin[Any] "implicitly[demixin.Out =:= HNil]" should compile
, Out of Demixin on non-mixed-in types should be a shapeless.HList that contains only one element
val demixin = Demixin[String] "implicitly[demixin.Out =:= (String :: HNil)]" should compile
Examples:
Linear Supertypes
Type Hierarchy
Ordering
- Alphabetic
- By Inheritance
Inherited
- Demixin
- AnyRef
- Any
Implicitly
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Demixin[ConjunctionType], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def ensuring(cond: (Demixin[ConjunctionType]) ⇒ Boolean, msg: ⇒ Any): Demixin[ConjunctionType]
- def ensuring(cond: (Demixin[ConjunctionType]) ⇒ Boolean): Demixin[ConjunctionType]
- def ensuring(cond: Boolean, msg: ⇒ Any): Demixin[ConjunctionType]
- def ensuring(cond: Boolean): Demixin[ConjunctionType]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (Demixin[ConjunctionType], B)