typelevel / algebra
1
package algebra.laws
2

3
import cats.kernel._
4

5
import org.typelevel.discipline.Laws
6

7
import org.scalacheck.{Arbitrary, Prop}
8

9
object BaseLaws {
10 0
  def apply[A : Eq : Arbitrary]: BaseLaws[A] = new BaseLaws[A] {
11 0
    def Equ = Eq[A]
12 0
    def Arb = implicitly[Arbitrary[A]]
13
  }
14
}
15

16
trait BaseLaws[A] extends Laws {
17

18
  implicit def Equ: Eq[A]
19
  implicit def Arb: Arbitrary[A]
20

21
  class BaseRuleSet(
22
    val name: String,
23
    val parent: Option[RuleSet],
24
    val bases: Seq[(String, Laws#RuleSet)],
25
    val props: (String, Prop)*
26
  ) extends RuleSet with HasOneParent
27
}

Read our documentation on viewing source code .

Loading