mirror of
https://github.com/github/semantic.git
synced 2024-12-21 22:01:46 +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
|
instance Evaluatable Send where
|
||||||
eval Send{..} = do
|
eval Send{..} = do
|
||||||
recvEnv <- case sendReceiver of
|
func <- case sendReceiver of
|
||||||
Just recv -> subtermValue recv >>= scopedEnvironment
|
Just recv -> do
|
||||||
Nothing -> getEnv -- send to implicit self
|
recvEnv <- subtermValue recv >>= scopedEnvironment
|
||||||
func <- localEnv (mappend recvEnv) (subtermValue sendSelector)
|
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
|
call func (map subtermValue sendArgs) -- TODO pass through sendBlock
|
||||||
|
|
||||||
data Require a = Require { requireRelative :: Bool, requirePath :: !a }
|
data Require a = Require { requireRelative :: Bool, requirePath :: !a }
|
||||||
|
Loading…
Reference in New Issue
Block a user