-
Notifications
You must be signed in to change notification settings - Fork 99
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
Fix unexpected free variable in FV #1251
Conversation
@@ -1938,6 +1922,7 @@ runTranslation modName funName info caps pactArgs body checkType = do | |||
CheckDefconst | |||
-> error "invariant violation: this cannot be a constant" | |||
_ <- extendPath -- form final edge for any remaining events | |||
expectNoFreeVars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final check that no free vars are dangling
@rsoeldner Where is the test to show what behavior this is actually impacting? |
@jwiegley ... missed pushing them |
(fold (child) true [[1]])) | ||
|] | ||
|
||
expectVerified [text| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this test need any properties? Or an assertion that (= (parent) [[false]])
or similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it would fail even without a property annotation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
Addresses #1250
This PR makes use of a stack of free variables to allow for nested application of higher-order functions such as
fold
ormap
.PR checklist:
cabal run tests
. If they pass locally, docs are generated.pact -t
), make sure pact-lsp is in sync.Additionally, please justify why you should or should not do the following: