From eb83f9478d0ff0e08791f85042132cdb009ef3cd Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Fri, 14 Dec 2018 12:01:34 -0800 Subject: [PATCH] Simplify a bit with `***` rather than `&&&` --- src/Data/Abstract/ScopeGraph.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Abstract/ScopeGraph.hs b/src/Data/Abstract/ScopeGraph.hs index 870909c73..21b0150ed 100644 --- a/src/Data/Abstract/ScopeGraph.hs +++ b/src/Data/Abstract/ScopeGraph.hs @@ -221,14 +221,14 @@ insertDeclarationScope :: Ord scopeAddress => Declaration -> scopeAddress -> sco insertDeclarationScope decl@Declaration{..} associatedScopeAddress scopeAddress g = fromMaybe g $ do declScopeAddress <- pathDeclarationScope scopeAddress =<< lookupScopePath unDeclaration scopeAddress g scope <- lookupScope declScopeAddress g - (declData, position) <- (fst &&& unPosition . snd) <$> lookupDeclaration unDeclaration declScopeAddress g + (declData, position) <- (id *** unPosition) <$> lookupDeclaration unDeclaration declScopeAddress g pure $ insertScope declScopeAddress (scope { declarations = Seq.adjust (const (Data decl (dataRelation declData) (dataSpan declData) (Just associatedScopeAddress))) position (declarations scope) }) g -- | Insert a declaration span into the declaration in the scope graph. insertDeclarationSpan :: Ord scopeAddress => Declaration -> Span -> ScopeGraph scopeAddress -> ScopeGraph scopeAddress insertDeclarationSpan decl@Declaration{..} span g = fromMaybe g $ do declScopeAddress <- scopeOfDeclaration decl g - (declData, position) <- (fst &&& unPosition . snd) <$> lookupDeclaration unDeclaration declScopeAddress g + (declData, position) <- (id *** unPosition) <$> lookupDeclaration unDeclaration declScopeAddress g scope <- lookupScope declScopeAddress g pure $ insertScope declScopeAddress (scope { declarations = Seq.adjust (const (Data decl (dataRelation declData) span (dataAssociatedScope declData))) position (declarations scope) }) g