From 30627fa518c5822940b82311c74c5d25e8a8d1f0 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 15 Aug 2018 11:52:48 -0400 Subject: [PATCH] Move the graph state outside the heap state. --- src/Semantic/Graph.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Semantic/Graph.hs b/src/Semantic/Graph.hs index b3805acfe..8e337894c 100644 --- a/src/Semantic/Graph.hs +++ b/src/Semantic/Graph.hs @@ -171,9 +171,10 @@ runImportGraph :: forall effs lang term vertex. -> Eff effs (Graph vertex) runImportGraph lang (package :: Package term) f = let analyzeModule = graphingModuleInfo - extractGraph (_, (graph, _)) = graph >>= f + extractGraph (graph, _) = graph >>= f runImportGraphAnalysis = runState lowerBound + . runState lowerBound . runFresh 0 . resumingLoadError . resumingUnspecialized @@ -182,7 +183,6 @@ runImportGraph lang (package :: Package term) f = . resumingResolutionError . resumingAddressError . resumingValueError - . runState lowerBound . runReader lowerBound . runModules (ModuleTable.modulePaths (packageModules package)) . runTermEvaluator @_ @_ @(Value (Hole (Maybe Name) Precise) (ConcreteEff (Hole (Maybe Name) Precise) effs)) @@ -198,7 +198,6 @@ type ConcreteEffects address rest ': Reader PackageInfo ': Modules address ': Reader (ModuleTable (NonEmpty (Module (ModuleResult address)))) - ': State (Graph ModuleInfo) ': Resumable (BaseError (ValueError address (ConcreteEff address rest))) ': Resumable (BaseError (AddressError address (Value address (ConcreteEff address rest)))) ': Resumable (BaseError ResolutionError) @@ -208,6 +207,7 @@ type ConcreteEffects address rest ': Resumable (BaseError (LoadError address)) ': Fresh ': State (Heap address (Value address (ConcreteEff address rest))) + ': State (Graph ModuleInfo) ': rest newtype ConcreteEff address outerEffects a = ConcreteEff