1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

📝 DeadCodeAnalysis.

This commit is contained in:
Rob Rix 2018-03-02 10:14:23 -05:00
parent dcc0d5e607
commit 479f6d2992

View File

@ -50,6 +50,7 @@ evaluateDead term = run @(DeadCodeEffects term value) . runEvaluator . runDeadCo
subterms term = para (foldMap (uncurry ((<>) . point))) term <> point term subterms term = para (foldMap (uncurry ((<>) . point))) term <> point term
-- | A newtype wrapping 'Evaluator' which performs a dead code analysis on evaluation.
newtype DeadCodeAnalysis term value a = DeadCodeAnalysis { runDeadCodeAnalysis :: Evaluator (DeadCodeEffects term value) term value a } newtype DeadCodeAnalysis term value a = DeadCodeAnalysis { runDeadCodeAnalysis :: Evaluator (DeadCodeEffects term value) term value a }
deriving (Applicative, Functor, Monad, MonadFail) deriving (Applicative, Functor, Monad, MonadFail)