mirror of
https://github.com/github/semantic.git
synced 2024-12-20 13:21:59 +03:00
Fix setCost infinite looping.
This commit is contained in:
parent
1668e94427
commit
978c91cd59
@ -97,7 +97,6 @@ diffFiles parser renderer sourceBlobs = do
|
||||
pure $! renderer textDiff sourceBlobs
|
||||
where construct :: CofreeF (Syntax Text) (Both Info) (Diff Text Info) -> Diff Text Info
|
||||
construct (info :< syntax) = free (Free ((setCost <$> info <*> sumCost syntax) :< syntax))
|
||||
setCost info cost = setCost info cost
|
||||
sumCost = fmap getSum . foldMap (fmap Sum . getCost)
|
||||
getCost diff = case runFree diff of
|
||||
Free (info :< _) -> cost <$> info
|
||||
|
Loading…
Reference in New Issue
Block a user