mirror of
https://github.com/github/semantic.git
synced 2024-11-28 01:47:01 +03:00
Rename a couple of copy-pasta’d variables.
This commit is contained in:
parent
a04ccbb08c
commit
34da6ada5c
@ -103,7 +103,7 @@ importGraphAnalysis = Analysis{..}
|
||||
bind _ _ m = m
|
||||
lookupEnv = pure . Just
|
||||
deref addr = gets (Map.lookup addr >=> nonEmpty . Set.toList) >>= maybe (pure Nothing) (foldMapA (pure . Just))
|
||||
assign addr ty = modify (Map.insertWith (<>) addr (Set.singleton ty))
|
||||
assign addr v = modify (Map.insertWith (<>) addr (Set.singleton v))
|
||||
abstract _ name body = do
|
||||
loc <- ask
|
||||
pure (Value (Closure loc name body) mempty)
|
||||
|
@ -93,7 +93,7 @@ scopeGraphAnalysis = Analysis{..}
|
||||
local (Map.insert name loc) m
|
||||
lookupEnv = pure . Just
|
||||
deref addr = gets (Map.lookup addr >=> nonEmpty . Set.toList) >>= maybe (pure Nothing) (foldMapA (pure . Just))
|
||||
assign addr ty = modify (Map.insertWith (<>) addr (Set.singleton ty))
|
||||
assign addr v = modify (Map.insertWith (<>) addr (Set.singleton v))
|
||||
abstract eval name body = do
|
||||
addr <- alloc name
|
||||
assign name (mempty @ScopeGraph)
|
||||
|
Loading…
Reference in New Issue
Block a user