1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 05:11:44 +03:00

s/maybeThis/maybeSelf

This commit is contained in:
joshvera 2018-12-13 19:09:19 -05:00
parent dab7c6d86a
commit 92ae60c5f1

View File

@ -101,7 +101,7 @@ instance ( FreeVariables term
boxed <- case op of
Closure _ _ _ _ _ (Left Print) _ _ -> traverse (trace . show) params $> Unit
Closure _ _ _ _ _ (Left Show) _ _ -> pure . String . pack $ show params
Closure packageInfo moduleInfo _ maybeThis names (Right body) associatedScope parentFrame -> do
Closure packageInfo moduleInfo _ maybeSelf names (Right body) associatedScope parentFrame -> do
-- Evaluate the bindings and body with the closures package/module info in scope in order to
-- charge them to the closure's origin.
withCurrentPackage packageInfo . withCurrentModule moduleInfo $ do
@ -109,7 +109,7 @@ instance ( FreeVariables term
let frameEdges = Map.singleton Lexical (Map.singleton parentScope parentFrame)
frameAddress <- newFrame associatedScope frameEdges
withScopeAndFrame frameAddress $ do
case maybeThis of
case maybeSelf of
Just object -> do
maybeSlot <- maybeLookupDeclaration (Declaration __self)
maybe (pure ()) (`assign` object) maybeSlot