1 {-# OPTIONS_GHC -Wno-orphans #-}
3 module Phylomemy.IndexationSpec where
6 import Data.Function ((.))
7 import Data.Functor ((<$>))
8 import Data.GenValidity
9 import Data.GenValidity.Map ()
10 import Data.GenValidity.Sequence ()
11 import Data.GenValidity.Set ()
12 import Data.GenValidity.Text ()
13 import Data.GenValidity.Time ()
16 import Data.Sequence qualified as Seq
17 import Data.Text.Short (ShortText)
18 import Data.Text.Short qualified as ShortText
19 import Data.Time (UTCTime)
20 import Data.Validity.Map ()
21 import Data.Validity.Set ()
22 import Data.Validity.Text ()
23 import GHC.Generics (Generic)
25 import Test.Syd.Validity
26 import Text.Show (Show)
31 import Clustering.FrequentItemSet.BruteForce qualified as Clustering
33 instance Validity ShortText where
34 validate = trivialValidation
35 instance GenValid ShortText where
36 genValid = ShortText.fromText <$> genValid
37 shrinkValid = (ShortText.fromText <$>) . shrinkValid . ShortText.toText
38 instance GenValid Ngram
39 instance GenValid Root
40 instance (Validity pos, GenValid pos) => GenValid (Document pos)
41 instance GenValid CoOccurences where
42 genValid = genValidStructurallyWithoutExtraChecking
43 shrinkValid = shrinkValidStructurallyWithoutExtraFiltering
44 instance (Ord item, Validity item, Validity a, GenValid item, GenValid a) => GenValid (Clustering.Transaction item a)
45 instance (Ord pos, Validity pos, GenValid pos) => GenValid (Range pos)
48 deriving (Eq, Ord, Show, Num, Generic)
56 genValidSpec @(Document UTCTime)
57 monoidSpec @CoOccurences
59 genValidSpec @(Clustering.Transaction Root (Document ()))
60 genValidSpec @(Rang :-> Clustering.Transaction Root (Document ()))
61 genValidSpec @(Rang :-> Cluster :-> Seq.Seq (Clustering.Transaction Root (Document Pos)))