Repository navigation
top-level val as compile-time value; --eval prints vals; Region pure at compile time - #41
Merged
Merged
Conversation
…ry top-level val; Region is no effect for purity (the compiler supplies it at compile time); run-time code naming a val is error[val-at-run-time] for now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A top-level
val x: T = eis a compile-time value.--evalnow prints every top-levelval, and no longer evaluates nullary defs.val x: T = eat top level, with the type required. It becomesAst.DVal, a nullary fn whose body ise.{Region}row or for a written{r: Region}binder. Any other effect iserror[unhandled-effect], since nothing outside a top-level val can handle it.error[val-at-run-time]. Emitting the value as C static data is a later rung.tests/s2/eval/*are rewritten toval. The old neg testseff_pureandpure_regionasserted "Region is an effect" and are replaced byeval/region(rg1 3, rg2 4); the old compiler rejects that file with impure-call. New:neg/val_effectandneg/val_runtime. README updated.Local gate, run alone: 203 ok, 0 FAIL.