1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Let-bind the function extending each value in the cell.

This commit is contained in:
Rob Rix 2019-08-06 15:05:15 -04:00
parent c30e5ff473
commit 0515d7c11d
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -102,7 +102,8 @@ scopeGraphAnalysis = Analysis{..}
ref <- asks Ref
bindLoc <- asks (Map.lookup addr)
cell <- gets (Map.lookup addr >=> nonEmpty . Set.toList)
maybe (pure Nothing) (foldMapA (pure . Just . mappend (extendBinding addr ref bindLoc))) cell
let extending = mappend (extendBinding addr ref bindLoc)
maybe (pure Nothing) (foldMapA (pure . Just . extending)) cell
assign addr v = do
ref <- asks Ref
bindLoc <- asks (Map.lookup addr)