mirror of
https://github.com/github/semantic.git
synced 2025-01-09 00:56:32 +03:00
Add Diffable' instance for Rec1 Maybe
This commit is contained in:
parent
17c8a4fd99
commit
bc158136bb
@ -157,3 +157,7 @@ instance Diffable' (Rec1 NonEmpty) where
|
||||
algorithmFor' (Rec1 (a:|as)) (Rec1 (b:|bs)) = Just $ do
|
||||
d:ds <- byRWS (a:as) (b:bs)
|
||||
pure (Rec1 (d :| ds))
|
||||
|
||||
-- | Diff two maybes holding parameters.
|
||||
instance Diffable' (Rec1 Maybe) where
|
||||
algorithmFor' (Rec1 a) (Rec1 b) = Just $ Rec1 <$> diffMaybe a b
|
||||
|
Loading…
Reference in New Issue
Block a user