mirror of
https://github.com/github/semantic.git
synced 2024-12-21 13:51:44 +03:00
Return the subtermValue of sendSelector if there's no receiver
This commit is contained in:
parent
341954f0e4
commit
9485a635dc
@ -45,10 +45,11 @@ instance Show1 Send where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
instance Evaluatable Send where
|
||||
eval Send{..} = do
|
||||
recvEnv <- case sendReceiver of
|
||||
Just recv -> subtermValue recv >>= scopedEnvironment
|
||||
Nothing -> getEnv -- send to implicit self
|
||||
func <- localEnv (mappend recvEnv) (subtermValue sendSelector)
|
||||
func <- case sendReceiver of
|
||||
Just recv -> do
|
||||
recvEnv <- subtermValue recv >>= scopedEnvironment
|
||||
localEnv (mappend recvEnv) (subtermValue sendSelector)
|
||||
Nothing -> subtermValue sendSelector -- TODO Does this require `localize` so we don't leak terms when resolving `sendSelector`?
|
||||
call func (map subtermValue sendArgs) -- TODO pass through sendBlock
|
||||
|
||||
data Require a = Require { requireRelative :: Bool, requirePath :: !a }
|
||||
|
Loading…
Reference in New Issue
Block a user