From c367494e4bdb955708652a5ad187ec0bd014d535 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 14 Apr 2022 09:51:08 -0400 Subject: [PATCH] Future proof. --- semantic-scope-graph/src/Control/Effect/ScopeGraph.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/semantic-scope-graph/src/Control/Effect/ScopeGraph.hs b/semantic-scope-graph/src/Control/Effect/ScopeGraph.hs index f6fe1e609..649deca4f 100644 --- a/semantic-scope-graph/src/Control/Effect/ScopeGraph.hs +++ b/semantic-scope-graph/src/Control/Effect/ScopeGraph.hs @@ -143,7 +143,7 @@ newReference name props = do CurrentScope currentAddress <- currentScope scope <- lookupScope currentAddress - let refProps = Reference.ReferenceInfo (props^.span_) (Props.Reference.kind props) lowerBound + let refProps = Reference.ReferenceInfo (props ^. span_) (Props.Reference.kind props) lowerBound insertRef' :: ScopeGraph.Path Name -> ScopeGraph.ScopeGraph Name -> ScopeGraph.ScopeGraph Name insertRef' path scopeGraph = let scope' = (ScopeGraph.insertReference (Reference.Reference name) lowerBound (Props.Reference.span props) (getField @"kind" props) path) scope @@ -179,9 +179,9 @@ declareMaybeName :: ScopeGraphEff sig m => Maybe Name -> Props.Declaration -> m Name -declareMaybeName maybeName props = do +declareMaybeName maybeName props@(Props.Declaration kind _ associatedScope span) = do case maybeName of Just name -> name <$ declare name props _ -> do name <- Name.gensym - name <$ declare name (props { Props.relation = ScopeGraph.Gensym }) + name <$ declare name (Props.Declaration kind ScopeGraph.Gensym associatedScope span)