Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
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 |
def apply[A : Eq : Arbitrary]: BaseLaws[A] = new BaseLaws[A] { |
|
11 |
def Equ = Eq[A] |
|
12 |
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 .