mirror of
https://github.com/github/semantic.git
synced 2024-12-21 22:01:46 +03:00
Include the root term.
This commit is contained in:
parent
f9797594e6
commit
a76027926d
@ -46,7 +46,7 @@ evaluateDead term = run @(DeadCodeEvaluating term value) . runEvaluator . runDea
|
||||
killAll (subterms term)
|
||||
evaluateTerm term
|
||||
where subterms :: (Ord a, Recursive a, Foldable (Base a)) => a -> Dead a
|
||||
subterms = para (foldMap (uncurry ((<>) . point)))
|
||||
subterms term = para (foldMap (uncurry ((<>) . point))) term <> point term
|
||||
|
||||
|
||||
newtype DeadCodeEvaluation term value a = DeadCodeEvaluation { runDeadCodeEvaluation :: Evaluator (DeadCodeEvaluating term value) term value a }
|
||||
|
Loading…
Reference in New Issue
Block a user