Skip to content

Commit

Permalink
delete useless withEnv call
Browse files Browse the repository at this point in the history
it wraps a call to 'apply', which replaces the environment put in place
by this 'withEnv' call with the environment captured in the closure.
  • Loading branch information
gelisam committed Jun 24, 2024
1 parent 5840300 commit e7a4c75
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Expander.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1397,12 +1397,7 @@ interpretMacroAction prob =
StuckOnType loc ty env cases closures ->
pure $ StuckOnType loc ty env cases (closures ++ [closure])
Done boundResult -> do
phase <- view (expanderLocal . expanderPhase)
s <- getState
let env = fromMaybe Env.empty .
view (expanderWorld . worldEnvironments . at phase) $
s
value <- expandEval $ withEnv env $ apply closure boundResult
value <- expandEval $ apply closure boundResult
case value of
ValueMacroAction act -> interpretMacroAction prob act
other -> throwError $ ValueNotMacro other
Expand Down

0 comments on commit e7a4c75

Please sign in to comment.