diff --git a/test/AlignmentSpec.hs b/test/AlignmentSpec.hs index cfbbd7456..5492d85bd 100644 --- a/test/AlignmentSpec.hs +++ b/test/AlignmentSpec.hs @@ -27,6 +27,7 @@ import Syntax import Term import Test.Hspec import Test.Hspec.QuickCheck +import Test.QuickCheck spec :: Spec spec = parallel $ do @@ -186,6 +187,9 @@ data Child = Child , childMargin :: [Char] } +instance Arbitrary Child where + arbitrary = Child <$> arbitrary <*> arbitrary <*> arbitrary + counts :: [Join These (Int, a)] -> Both Int counts numbered = fromMaybe 0 . getLast . mconcat . fmap Last <$> Join (unalign (runJoin . fmap Prelude.fst <$> numbered))