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

Spell out the label field.

This commit is contained in:
Rob Rix 2018-03-15 14:48:06 -04:00
parent ba84fffd56
commit 6fc1747652

View File

@ -193,13 +193,13 @@ instance ( Monad m
injValue . Closure names l . bindEnv (foldr Set.delete (freeVariables body) names) <$> askLocalEnv
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
v <- param
a <- alloc name
assign a v
envInsert name a <$> rest) (pure env) (zip names params)
localEnv (mappend bindings) (goto l >>= evaluateTerm)
localEnv (mappend bindings) (goto label >>= evaluateTerm)
loop = fix