mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Spell out the label field.
This commit is contained in:
parent
ba84fffd56
commit
6fc1747652
@ -193,13 +193,13 @@ instance ( Monad m
|
|||||||
injValue . Closure names l . bindEnv (foldr Set.delete (freeVariables body) names) <$> askLocalEnv
|
injValue . Closure names l . bindEnv (foldr Set.delete (freeVariables body) names) <$> askLocalEnv
|
||||||
|
|
||||||
apply op params = do
|
apply op params = do
|
||||||
Closure names l env <- maybe (fail ("expected a closure, got: " <> show op)) pure (prjValue op)
|
Closure names label env <- maybe (fail ("expected a closure, got: " <> show op)) pure (prjValue op)
|
||||||
bindings <- foldr (\ (name, param) rest -> do
|
bindings <- foldr (\ (name, param) rest -> do
|
||||||
v <- param
|
v <- param
|
||||||
a <- alloc name
|
a <- alloc name
|
||||||
assign a v
|
assign a v
|
||||||
envInsert name a <$> rest) (pure env) (zip names params)
|
envInsert name a <$> rest) (pure env) (zip names params)
|
||||||
localEnv (mappend bindings) (goto l >>= evaluateTerm)
|
localEnv (mappend bindings) (goto label >>= evaluateTerm)
|
||||||
|
|
||||||
loop = fix
|
loop = fix
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user