1 {-# OPTIONS_GHC -Wno-orphans #-}
3 module Phylomemy.SimilaritySpec where
5 import Data.Function ((.))
6 import Data.Functor ((<$>))
7 import Data.GenValidity.Map ()
8 import Data.GenValidity.Set ()
9 import Data.GenValidity.Text ()
10 import Data.GenValidity.Time ()
11 import Data.Validity.Map ()
12 import Data.Validity.Set ()
13 import Data.Validity.Text ()
14 import Numeric.Decimal (Decimal (..), unwrapDecimal)
15 import Numeric.Probability (Probability, ProbabilityBounded (..))
17 import Test.Syd.Validity
20 import Phylomemy.IndexationSpec ()
22 instance GenValid ProbabilityBounded where
24 shrinkValid = (ProbabilityBounded <$>) . shrinkValid . unProbabilityBounded
25 instance GenValid Probability where
26 genValid = Decimal <$> genValid
27 shrinkValid = (Decimal <$>) . shrinkValid . unwrapDecimal
29 -- instance GenValid (Similarities Probability) where
30 -- genValid = genValidStructurallyWithoutExtraChecking
31 -- shrinkValid = shrinkValidStructurallyWithoutExtraFiltering
35 genValidSpec @Probability
36 genValidSpec @(Similarities Probability)