File: Spec.hs

package info (click to toggle)
haskell-hedgehog-classes 0.2.5.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 508 kB
  • sloc: haskell: 6,010; makefile: 8
file content (88 lines) | stat: -rw-r--r-- 1,737 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
module Main (main) where

import Hedgehog.Classes

import Spec.Alternative
import Spec.Applicative
import Spec.Arrow
import Spec.Bifoldable
import Spec.Bifunctor
import Spec.Binary
import Spec.Bitraversable
import Spec.Bits
import Spec.Category
import Spec.Comonad
import Spec.Contravariant
import Spec.Enum
import Spec.Eq
import Spec.Foldable
import Spec.Functor
import Spec.Generic
import Spec.Integral
--import Spec.Ix
import Spec.Json
import Spec.Monad
import Spec.Monoid
import Spec.MVector
import Spec.Ord
import Spec.Prim
import Spec.Semigroup
import Spec.Semiring
import Spec.Show
import Spec.Storable
import Spec.Traversable

main :: IO Bool
main = lawsCheckMany allLaws

allNullaryLaws :: [(String, [Laws])]
allNullaryLaws = testBits
  ++ testEnum
  ++ testBoundedEnum
  ++ testBinary
  ++ testEq
  ++ testGeneric
  ++ testIntegral
--  ++ testIx
  ++ testJson
  ++ testMonoid
  ++ testCommutativeMonoid
  ++ testOrd
  ++ testPrim
  ++ testSemigroup
  ++ testCommutativeSemigroup
  ++ testExponentialSemigroup
  ++ testIdempotentSemigroup
  ++ testRectangularBandSemigroup
  ++ testSemiring
  ++ testRing
  ++ testStar
  ++ testShow
  ++ testShowRead
  ++ testStorable
  ++ testMUVector

allUnaryLaws :: [(String, [Laws])]
allUnaryLaws = testAlternative
  ++ testApplicative
  ++ testComonad
  ++ testContravariant
  ++ testFoldable
  ++ testFunctor
  ++ testMonad
  ++ testMonadIO
  ++ testMonadPlus
  ++ testMonadZip
  ++ testTraversable

allBinaryLaws :: [(String, [Laws])]
allBinaryLaws = testArrow
  ++ testBifoldable
  ++ testBifoldableFunctor
  ++ testBifunctor
  ++ testBitraversable
  ++ testCategory
  ++ testCommutativeCategory

allLaws :: [(String, [Laws])]
allLaws = allNullaryLaws ++ allUnaryLaws ++ allBinaryLaws