object Bool

Contains implementation for Bool and typeconstructor aliases that make usage more pleasant

The operations can be shown to satisfy:

1. Associativity of Or: ||[A, B || C] =:= ||[A || B, C]

2. Associativity of And: &&[A, B && C] =:= &&[A && B, C]

3. Commutativity of Or: ||[A, B] =:= ||[B, A]

4. Commutativity of And: &&[A, B] =:= &&[B, A]

5. Distributivity of Or over And: ||[A, B && C] =:= &&[A || B, A || C]

6. Distributivity of And over Or: &&[A, B || C] =:= ||[A && B, A && C]

7. Identity for Or: ||[A, False] =:= A

8. Identity for And: &&[A, True] =:= A

9. Annhilator for Or: ||[A, True] =:= True

10. Annhilator for And: &&[A, False] =:= False

11. Idempotence of Or: ||[A, A] =:= A

12. Idempotence of And: &&[A, A] =:= A

13. Absorption 1: &&[A, A || B] =:= A

14. Absorbtion 2: ||[A, A && B] =:= A

15. Complementation 1: &&[A, Not[A]] =:= False

16. Complementation 2: ||[A, Not[A]] =:= True

17. Double Negation: Not[Not[A]] =:= A

18. De Morgan 1: &&[Not[A], Not[B]] =:= Not[A || B]

19. De Morgan 2: ||[Not[A], Not[B]] =:= Not[A && B]

Author:

Harshad Deo

Since

0.1

Linear Supertypes
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Bool
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type &&[A <: Bool, B <: Bool] = Bool.&&.A.If[B, False, Bool]

    Type constructor for logical conjunction

    Type constructor for logical conjunction

    A && B =:= True if A =:= True and B =:= True

    A && B =:= False otherwise

    Author:

    Harshad Deo

    Since

    0.1

  2. type ->>[A <: Bool, B <: Bool] = Bool.->>.A.If[B, True, Bool]

    Typeconstructor for material implication

    Typeconstructor for material implication

    If A =:= True, A ->> B =:= B

    If A =:= False, the value of B is ignored and the constructor returns True

    Author:

    Harshad Deo

    Since

    0.1

  3. final class BoolRep[B <: Bool] extends AnyVal

    Provides a value for a type level boolean

    Provides a value for a type level boolean

    Author:

    Harshad Deo

    Since

    0.1

  4. type Eqv[A <: Bool, B <: Bool] = Bool.Eqv.A.If[B, Not[B], Bool]

    Type constructor for logical equivalence

    Type constructor for logical equivalence

    A Eqv B =:= True if A =:= B

    A Eqv B =:= False otherwise

    Author:

    Harshad Deo

    Since

    0.1

  5. final class False extends Bool

    Typelevel representation of a predicate being False

    Typelevel representation of a predicate being False

    Author:

    Harshad Deo

    Since

    0.1

  6. type Not[A <: Bool] = Bool.Not.A.If[False, True, Bool]

    Type constructor for logical negation

    Type constructor for logical negation

    Not[True] =:= False

    Not[False] =:= True

    Author:

    Harshad Deo

    Since

    0.1

  7. final class True extends Bool

    Typelevel representation of a predicate being true

    Typelevel representation of a predicate being true

    Author:

    Harshad Deo

    Since

    0.1

  8. type Xor[A <: Bool, B <: Bool] = Bool.Xor.A.If[Not[B], B, Bool]

    Type constructor for logical exclusive or

    Type constructor for logical exclusive or

    A Xor B =:= True if exactly one of A =:= True or B =:= True

    A Xor B =:= False otherwise

    Author:

    Harshad Deo

    Since

    0.1

  9. type ||[A <: Bool, B <: Bool] = Bool.||.A.If[True, B, Bool]

    Type constructor for logical disjunction

    Type constructor for logical disjunction

    A || B =:= False if A =:= False and B =:= False

    A || B =:= True otherwise

    Author:

    Harshad Deo

    Since

    0.1

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toBoolean[B <: Bool](implicit ev: BoolRep[B]): Boolean

    Method to convert a typelevel boolean to its value representation

    Method to convert a typelevel boolean to its value representation

    Author:

    Harshad Deo

    B

    Type of the boolean to be converted to a value

    Since

    0.1

  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. object BoolRep

    Provides implicits for converting typelevel booleans to value level booleans

    Provides implicits for converting typelevel booleans to value level booleans

    Author:

    Harshad Deo

    Since

    0.1

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Implementations

Operations

Ungrouped