diff --git a/src/Analysis/Abstract/Caching.hs b/src/Analysis/Abstract/Caching.hs index 25c975284..6b0c9e7d3 100644 --- a/src/Analysis/Abstract/Caching.hs +++ b/src/Analysis/Abstract/Caching.hs @@ -140,7 +140,7 @@ memoizeEval e = do Nothing -> do pairs <- asksCache (fromMaybe mempty . cacheLookup c) modifyCache (cacheSet c pairs) - v <- liftAnalyze e + v <- liftAnalyze analyzeTerm e store' <- getStore modifyCache (cacheInsert c (v, store')) pure v diff --git a/src/Analysis/Abstract/Dead.hs b/src/Analysis/Abstract/Dead.hs index dfed999d6..1b4db2f25 100644 --- a/src/Analysis/Abstract/Dead.hs +++ b/src/Analysis/Abstract/Dead.hs @@ -72,4 +72,4 @@ instance ( Corecursive (TermFor m) => MonadAnalysis (DeadCodeAnalysis m) where analyzeTerm term = do revive (embedSubterm term) - liftAnalyze term + liftAnalyze analyzeTerm term diff --git a/src/Analysis/Abstract/Tracing.hs b/src/Analysis/Abstract/Tracing.hs index eeb07f2dc..a6211270b 100644 --- a/src/Analysis/Abstract/Tracing.hs +++ b/src/Analysis/Abstract/Tracing.hs @@ -36,7 +36,7 @@ instance ( Corecursive (TermFor m) analyzeTerm term = do config <- getConfiguration (embedSubterm term) trace (Reducer.unit config) - liftAnalyze term + liftAnalyze analyzeTerm term trace :: ( Effectful m , Member (TracerFor trace m) (Effects m) diff --git a/src/Control/Abstract/Analysis.hs b/src/Control/Abstract/Analysis.hs index f36eaa09e..b8ec7c0f6 100644 --- a/src/Control/Abstract/Analysis.hs +++ b/src/Control/Abstract/Analysis.hs @@ -41,10 +41,10 @@ liftAnalyze :: ( term ~ TermFor m , Coercible (m value) (t m value) , Coercible (t m value) (m value) , Functor (Base term) - , MonadAnalysis m ) - => SubtermAlgebra (Base term) term (t m value) -liftAnalyze term = pack1 (analyzeTerm (second unpack1 <$> term)) + => SubtermAlgebra (Base term) term (m value) + -> SubtermAlgebra (Base term) term (t m value) +liftAnalyze analyze term = pack1 (analyze (second unpack1 <$> term)) where pack1 = coerce unpack1 :: Coercible (t m value) (m value) => t m value -> m value unpack1 = coerce