mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Get the declared names of methods using declaredName.
This commit is contained in:
parent
12d2bc1d6b
commit
cc6ed63103
@ -47,7 +47,7 @@ instance Diffable Method where
|
||||
-- local environment.
|
||||
instance Evaluatable Method where
|
||||
eval Method{..} = do
|
||||
name <- either (throwEvalError . FreeVariablesError) pure (freeVariable $ subterm methodName)
|
||||
name <- maybeM (throwEvalError (FreeVariablesError [])) (declaredName (subterm methodName))
|
||||
(_, addr) <- letrec name (closure (paramNames methodParameters) (Set.fromList (freeVariables methodBody)) (subtermAddress methodBody))
|
||||
bind name addr
|
||||
pure (Rval addr)
|
||||
|
Loading…
Reference in New Issue
Block a user