1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

Specialize caching to [].

This commit is contained in:
Rob Rix 2018-07-17 15:36:58 -04:00
parent 1900507609
commit 41b9fd65ca
3 changed files with 4 additions and 4 deletions

View File

@ -125,8 +125,8 @@ scatter :: (Foldable t, Member NonDet effects, Member (State (Heap address (Cell
scatter = foldMapA (\ (Cached value heap') -> TermEvaluator (putHeap heap') $> value)
caching :: (Alternative f, Effects effects) => TermEvaluator term address value (NonDet ': Reader (Cache term address (Cell address) value) ': State (Cache term address (Cell address) value) ': effects) a -> TermEvaluator term address value effects (Cache term address (Cell address) value, f a)
caching :: Effects effects => TermEvaluator term address value (NonDet ': Reader (Cache term address (Cell address) value) ': State (Cache term address (Cell address) value) ': effects) a -> TermEvaluator term address value effects (Cache term address (Cell address) value, [a])
caching
= runState lowerBound
. runReader lowerBound
. runNonDetA
. runNonDet

View File

@ -101,7 +101,7 @@ runCallGraph lang includePackages modules package = do
. resumingAddressError
. runTermEvaluator @_ @(Hole (Maybe Name) (Located Monovariant)) @Abstract
. graphing
. caching @[]
. caching
. runReader (packageInfo package)
. runReader (lowerBound @Span)
. providingLiveSet

View File

@ -82,7 +82,7 @@ checking
. runFresh 0
. runPrintingTrace
. runTermEvaluator @_ @Monovariant @Type
. caching @[]
. caching
. providingLiveSet
. fmap reassociate
. runLoadError