1
1
mirror of https://github.com/github/semantic.git synced 2025-01-09 00:56:32 +03:00

Define an Eq1 instance for DiffF.

This commit is contained in:
Rob Rix 2017-09-09 12:31:30 +01:00
parent f65fb137fa
commit 2f63aca72f

View File

@ -101,6 +101,9 @@ instance Eq1 f => Eq2 (DiffF f) where
(Patch p1, Patch p2) -> liftEq (liftEq eqA) p1 p2
_ -> False
instance (Eq1 f, Eq a) => Eq1 (DiffF f a) where
liftEq = liftEq2 (==)
instance Show1 f => Show2 (DiffF f) where
liftShowsPrec2 spA slA spB slB d diff = case diff of
Copy ann r -> showsBinaryWith (liftShowsPrecBoth spA slA) (liftShowsPrec spB slB) "Copy" d ann r