2016-04-22 19:54:50 +03:00
|
|
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
2015-12-22 20:53:31 +03:00
|
|
|
module ArbitraryTerm where
|
|
|
|
|
2016-03-15 18:17:47 +03:00
|
|
|
import Data.Text.Arbitrary ()
|
2016-06-06 18:46:30 +03:00
|
|
|
import Data.These.Arbitrary ()
|
2016-05-26 19:58:04 +03:00
|
|
|
import Prologue hiding (fst, snd)
|
2016-03-15 18:17:47 +03:00
|
|
|
import Source hiding ((++))
|
2015-12-22 20:53:31 +03:00
|
|
|
import Test.QuickCheck hiding (Fixed)
|
|
|
|
|
|
|
|
data CategorySet = A | B | C | D deriving (Eq, Show)
|
|
|
|
|
|
|
|
instance Arbitrary CategorySet where
|
|
|
|
arbitrary = elements [ A, B, C, D ]
|
2016-03-15 18:17:47 +03:00
|
|
|
|
|
|
|
instance Arbitrary a => Arbitrary (Source a) where
|
|
|
|
arbitrary = Source.fromList <$> arbitrary
|