mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Implement construction of arbitrary PrettyDiffs.
This commit is contained in:
parent
e0e7f0fa4a
commit
a594f54279
@ -244,6 +244,9 @@ instance Arbitrary BranchElement where
|
||||
instance Show BranchElement where
|
||||
show = show . branchElementContents
|
||||
|
||||
instance Arbitrary (PrettyDiff [(String, Range)]) where
|
||||
arbitrary = toPrettyDiff <$> listOf1 arbitrary
|
||||
|
||||
counts :: [Join These (Int, a)] -> Both Int
|
||||
counts numbered = fromMaybe 0 . getLast . mconcat . fmap Last <$> Join (unalign (runJoin . fmap Prelude.fst <$> numbered))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user