-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change apply() and eval() to methods on Runtime.
Note that while doing this, I encountered a corner case of the borrow-checker: rust-lang/rust#59159 The following attribute suppresses the warning (which would otherwise cause continuous integration to fail): #[allow(mutable_borrow_reservation_conflict)] Taking a second look at this, it seems a bit dubious that the eval() method should be mutating the Runtime at all. This suggests that I should split the Runtime into two substructures: an immutable part containing the local context, the builtins, the global context, etc, and a mutable part which contains the readline Editor and the hole information. The evaluation part can then be purely functional, while hole-filling can be mutative.
- Loading branch information
Showing
2 changed files
with
74 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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