1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 12:21:57 +03:00

Move the graph state outside the heap state.

This commit is contained in:
Rob Rix 2018-08-15 11:52:48 -04:00
parent 4d08e47cf0
commit 30627fa518

View File

@ -171,9 +171,10 @@ runImportGraph :: forall effs lang term vertex.
-> Eff effs (Graph vertex) -> Eff effs (Graph vertex)
runImportGraph lang (package :: Package term) f = runImportGraph lang (package :: Package term) f =
let analyzeModule = graphingModuleInfo let analyzeModule = graphingModuleInfo
extractGraph (_, (graph, _)) = graph >>= f extractGraph (graph, _) = graph >>= f
runImportGraphAnalysis runImportGraphAnalysis
= runState lowerBound = runState lowerBound
. runState lowerBound
. runFresh 0 . runFresh 0
. resumingLoadError . resumingLoadError
. resumingUnspecialized . resumingUnspecialized
@ -182,7 +183,6 @@ runImportGraph lang (package :: Package term) f =
. resumingResolutionError . resumingResolutionError
. resumingAddressError . resumingAddressError
. resumingValueError . resumingValueError
. runState lowerBound
. runReader lowerBound . runReader lowerBound
. runModules (ModuleTable.modulePaths (packageModules package)) . runModules (ModuleTable.modulePaths (packageModules package))
. runTermEvaluator @_ @_ @(Value (Hole (Maybe Name) Precise) (ConcreteEff (Hole (Maybe Name) Precise) effs)) . runTermEvaluator @_ @_ @(Value (Hole (Maybe Name) Precise) (ConcreteEff (Hole (Maybe Name) Precise) effs))
@ -198,7 +198,6 @@ type ConcreteEffects address rest
': Reader PackageInfo ': Reader PackageInfo
': Modules address ': Modules address
': Reader (ModuleTable (NonEmpty (Module (ModuleResult address)))) ': Reader (ModuleTable (NonEmpty (Module (ModuleResult address))))
': State (Graph ModuleInfo)
': Resumable (BaseError (ValueError address (ConcreteEff address rest))) ': Resumable (BaseError (ValueError address (ConcreteEff address rest)))
': Resumable (BaseError (AddressError address (Value address (ConcreteEff address rest)))) ': Resumable (BaseError (AddressError address (Value address (ConcreteEff address rest))))
': Resumable (BaseError ResolutionError) ': Resumable (BaseError ResolutionError)
@ -208,6 +207,7 @@ type ConcreteEffects address rest
': Resumable (BaseError (LoadError address)) ': Resumable (BaseError (LoadError address))
': Fresh ': Fresh
': State (Heap address (Value address (ConcreteEff address rest))) ': State (Heap address (Value address (ConcreteEff address rest)))
': State (Graph ModuleInfo)
': rest ': rest
newtype ConcreteEff address outerEffects a = ConcreteEff newtype ConcreteEff address outerEffects a = ConcreteEff