Skip to content

Commit 82f8b5b

Browse files
committed
Update docs
1 parent b79ae03 commit 82f8b5b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Generics/Diff/Class.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ we can "descend" through) depends on the implementation of the instance.
3434
For user-defined types, it's strongly recommended you derive your 'Diff' instance using 'Generic' from
3535
@generics-sop@. If those types refer to other types, those will need 'Diff' instances too. For example:
3636
37+
However, in some cases we'll want to use a custom type for representing diffs of user-defined or
38+
third-party types. For example, if we have non-derived `Eq` instances, invariants etc. In that case,
39+
see "Generics.Diff.Special".
40+
3741
@
3842
{\-# LANGUAGE DerivingStrategies #-\}
3943
{\-# LANGUAGE DeriveGeneric #-\}

src/Generics/Diff/Type.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ newtype Differ x = Differ (x -> x -> DiffResult x)
1919

2020
{- | A GADT representing an error during the diff algorithm - i.e. this tells us where and how two values differ.
2121
22-
The special constructors for list are so that we can treat these types a bit uniquely. See 'ListDiffError'.
22+
The 'DiffSpecial' constructors for instances of 'SpecialDiff' are so that we can treat these types uniquely.
23+
See 'SpecialDiff'.
2324
-}
2425
data DiffError a where
2526
-- | All we can say is that the values being compared are not equal.

0 commit comments

Comments
 (0)