1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

🔥 use of the obsolete reinjection functions.

This commit is contained in:
Rob Rix 2017-09-15 11:11:56 -04:00
parent 327fd463aa
commit 03f33436c3
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ genericAlgorithmFor a b = fmap to1 <$> algorithmFor' (from1 a) (from1 b)
-- diff terms from the "rest" of the Union, and 'inj' adds the diff terms into the Union.
-- NB: If Left or Right Syntax terms in our Union don't match, we fail fast by returning Nothing.
instance Apply1 Diffable fs => Diffable (Union fs) where
algorithmFor u1 u2 = join (apply1_2' (Proxy :: Proxy Diffable) (\ reinj f1 f2 -> fmap reinj <$> algorithmFor f1 f2) u1 u2)
algorithmFor u1 u2 = join (apply1_2 (Proxy :: Proxy Diffable) (\ f1 f2 -> fmap inj <$> algorithmFor f1 f2) u1 u2)
-- | Diff two list parameters using RWS.
instance Diffable [] where

View File

@ -30,7 +30,7 @@ instance GAlign Identity where
galignWith f (Identity a) (Identity b) = Just (Identity (f (These a b)))
instance (Apply1 GAlign fs) => GAlign (Union fs) where
galignWith f = (join .) . apply1_2' (Proxy :: Proxy GAlign) (\ inj -> (fmap inj .) . galignWith f)
galignWith f = (join .) . apply1_2 (Proxy :: Proxy GAlign) ((fmap inj .) . galignWith f)
instance GAlign (Union '[]) where
galignWith _ _ _ = Nothing