mirror of
https://github.com/github/semantic.git
synced 2024-12-27 00:44:57 +03:00
📝 DiffFor.
This commit is contained in:
parent
e4346562d6
commit
0c3170edc4
@ -31,6 +31,9 @@ stripDiff = bimap snd snd
|
||||
|
||||
-- | The class of term types for which we can compute a diff.
|
||||
class (Bifoldable (DiffFor term)) => DiffTerms term where
|
||||
-- | The type of diffs for the given term type.
|
||||
--
|
||||
-- Note that the dependency means that the diff type is in 1:1 correspondence with the term type. This allows subclasses of 'DiffTerms' to receive e.g. @'DiffFor' term a b@ without incurring ambiguity, since every diff type is unique to its term type.
|
||||
type DiffFor term = (diff :: * -> * -> *) | diff -> term
|
||||
|
||||
-- | Diff a 'These' of terms.
|
||||
|
Loading…
Reference in New Issue
Block a user