Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete useless withEnv call #243

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/Expander.hs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@
[ ( "open-syntax"
, Scheme [] $ tFun [tSyntax] (Prims.primitiveDatatype "Syntax-Contents" [tSyntax])
, ValueClosure $ HO $
\(ValueSyntax stx) ->

Check warning on line 413 in src/Expander.hs

View workflow job for this annotation

GitHub Actions / stack / ghc 9.2.8

Pattern match(es) are non-exhaustive

Check warning on line 413 in src/Expander.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest / ghc 9.2.5

Pattern match(es) are non-exhaustive

Check warning on line 413 in src/Expander.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest / ghc 9.2.5

Pattern match(es) are non-exhaustive
case syntaxE stx of
Id name ->
primitiveCtor "identifier-contents" [ValueString name]
Expand All @@ -428,9 +428,9 @@
, Scheme [] $
tFun [tSyntax, tSyntax, Prims.primitiveDatatype "Syntax-Contents" [tSyntax]] tSyntax
, ValueClosure $ HO $
\(ValueSyntax locStx) ->

Check warning on line 431 in src/Expander.hs

View workflow job for this annotation

GitHub Actions / stack / ghc 9.2.8

Pattern match(es) are non-exhaustive

Check warning on line 431 in src/Expander.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest / ghc 9.2.5

Pattern match(es) are non-exhaustive

Check warning on line 431 in src/Expander.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest / ghc 9.2.5

Pattern match(es) are non-exhaustive
ValueClosure $ HO $
\(ValueSyntax scopesStx) ->

Check warning on line 433 in src/Expander.hs

View workflow job for this annotation

GitHub Actions / stack / ghc 9.2.8

Pattern match(es) are non-exhaustive

Check warning on line 433 in src/Expander.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest / ghc 9.2.5

Pattern match(es) are non-exhaustive

Check warning on line 433 in src/Expander.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest / ghc 9.2.5

Pattern match(es) are non-exhaustive
ValueClosure $ HO $
-- N.B. Assuming correct constructors
\(ValueCtor ctor [arg]) ->
Expand Down Expand Up @@ -1397,12 +1397,7 @@
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
Loading