-
Notifications
You must be signed in to change notification settings - Fork 97
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
Backend: Allow actor class foo() { .. }
as last expression
#448
Merged
Conversation
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 is in anticipation of #400. It extends the prevoius hack in the backend, and does not include the necessary changes to the front end for proper error handling. But it finally allows the produce exchange to use `import` for everything, no longer relying on the concatenation of source files (relevant for #447).
now that we can use `actor class Foo () {..}` for actor files. Also wraps the standard libraries in `module {…}`, following the hint that `asc` spits out (probably introduced by @crusso).
matthewhammer
approved these changes
May 28, 2019
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.
LGTM!
Especially good because it contains the module {
refactoring that @crusso left for me to do : )
We might have to undo the |
dfinity-bot
added a commit
that referenced
this pull request
Jan 18, 2023
## Changelog for motoko-base: Branch: next-moc Commits: [dfinity/motoko-base@40e2d36e...551acc9a](dfinity/motoko-base@40e2d36...551acc9) * [`3a8d1f44`](dfinity/motoko-base@3a8d1f4) test: List module ([dfinity/motoko-base#457](https://togithub.com/dfinity/motoko-base/issues/457)) * [`d74cc136`](dfinity/motoko-base@d74cc13) Int documentation and unit tests ([dfinity/motoko-base#473](https://togithub.com/dfinity/motoko-base/issues/473)) * [`7171ebe3`](dfinity/motoko-base@7171ebe) Fix typo in Int.neg() function name ([dfinity/motoko-base#479](https://togithub.com/dfinity/motoko-base/issues/479)) * [`85e17dcb`](dfinity/motoko-base@85e17dc) Motoko 0.7.5 * [`489a7595`](dfinity/motoko-base@489a759) Add `Array.size()` * [`15ec733a`](dfinity/motoko-base@15ec733) Fix `Array.size` example * [`bafaab29`](dfinity/motoko-base@bafaab2) Remove extraneous closing brace * [`bc011ec3`](dfinity/motoko-base@bc011ec) Add missing semicolon * [`8e2057d1`](dfinity/motoko-base@8e2057d) fix: import in `Trie.mo` * [`f884484b`](dfinity/motoko-base@f884484) Add 'mo:base' import sanity check * [`70f291d7`](dfinity/motoko-base@70f291d) Add link to PR in reference check file * [`e35fde03`](dfinity/motoko-base@e35fde0) feat: user-facing API for timers ([dfinity/motoko-base#474](https://togithub.com/dfinity/motoko-base/issues/474)) * [`cf74656f`](dfinity/motoko-base@cf74656) doc: Text module ([dfinity/motoko-base#458](https://togithub.com/dfinity/motoko-base/issues/458)) * [`b1d30ec1`](dfinity/motoko-base@b1d30ec) chore: add examples for CertifiedData ([dfinity/motoko-base#469](https://togithub.com/dfinity/motoko-base/issues/469)) * [`a3233a47`](dfinity/motoko-base@a3233a4) doc: ExperimentalStableMemory module ([dfinity/motoko-base#482](https://togithub.com/dfinity/motoko-base/issues/482)) * [`e52bc256`](dfinity/motoko-base@e52bc25) Small typo in CertifiedData ([dfinity/motoko-base#490](https://togithub.com/dfinity/motoko-base/issues/490)) * [`3729c65c`](dfinity/motoko-base@3729c65) Float documentation and unit tests ([dfinity/motoko-base#455](https://togithub.com/dfinity/motoko-base/issues/455)) * [`1fa5240f`](dfinity/motoko-base@1fa5240) Deque documentation and unit tests ([dfinity/motoko-base#465](https://togithub.com/dfinity/motoko-base/issues/465)) * [`a6826315`](dfinity/motoko-base@a682631) RBTree documentation and unit tests ([dfinity/motoko-base#472](https://togithub.com/dfinity/motoko-base/issues/472)) * [`edb24def`](dfinity/motoko-base@edb24de) ExperimentalCycles documentation (no unit tests) ([dfinity/motoko-base#477](https://togithub.com/dfinity/motoko-base/issues/477)) * [`eded1b73`](dfinity/motoko-base@eded1b7) doc: Text module ([dfinity/motoko-base#458](https://togithub.com/dfinity/motoko-base/issues/458)) * [`41736374`](dfinity/motoko-base@4173637) chore: add examples for CertifiedData ([dfinity/motoko-base#469](https://togithub.com/dfinity/motoko-base/issues/469)) * [`f4255ddb`](dfinity/motoko-base@f4255dd) doc: ExperimentalStableMemory module ([dfinity/motoko-base#482](https://togithub.com/dfinity/motoko-base/issues/482)) * [`d99cd69d`](dfinity/motoko-base@d99cd69) Small typo in CertifiedData ([dfinity/motoko-base#490](https://togithub.com/dfinity/motoko-base/issues/490)) * [`859edc14`](dfinity/motoko-base@859edc1) Float documentation and unit tests ([dfinity/motoko-base#455](https://togithub.com/dfinity/motoko-base/issues/455)) * [`384ef6ee`](dfinity/motoko-base@384ef6e) Deque documentation and unit tests ([dfinity/motoko-base#465](https://togithub.com/dfinity/motoko-base/issues/465)) * [`f0cf4da4`](dfinity/motoko-base@f0cf4da) RBTree documentation and unit tests ([dfinity/motoko-base#472](https://togithub.com/dfinity/motoko-base/issues/472)) * [`66a682af`](dfinity/motoko-base@66a682a) ExperimentalCycles documentation (no unit tests) ([dfinity/motoko-base#477](https://togithub.com/dfinity/motoko-base/issues/477)) * [`b4b6caca`](dfinity/motoko-base@b4b6cac) Add `Array.size` ([dfinity/motoko-base#494](https://togithub.com/dfinity/motoko-base/issues/494)) * [`a5910190`](dfinity/motoko-base@a591019) fix: non-local import in `Trie.mo` ([dfinity/motoko-base#495](https://togithub.com/dfinity/motoko-base/issues/495)) * [`823b0b40`](dfinity/motoko-base@823b0b4) Add `Array.size` ([dfinity/motoko-base#494](https://togithub.com/dfinity/motoko-base/issues/494)) * [`4e6a7554`](dfinity/motoko-base@4e6a755) fix: non-local import in `Trie.mo` ([dfinity/motoko-base#495](https://togithub.com/dfinity/motoko-base/issues/495)) * [`98c96a57`](dfinity/motoko-base@98c96a5) doc: add some explanation and improve examples in `Func.mo` ([dfinity/motoko-base#471](https://togithub.com/dfinity/motoko-base/issues/471)) * [`4f8d37b6`](dfinity/motoko-base@4f8d37b) Int8/16/32/64 documentation and unit tests ([dfinity/motoko-base#475](https://togithub.com/dfinity/motoko-base/issues/475)) * [`ef40d9d4`](dfinity/motoko-base@ef40d9d) fix: Base library issues with `Float` ([dfinity/motoko-base#480](https://togithub.com/dfinity/motoko-base/issues/480)) * [`842e2b95`](dfinity/motoko-base@842e2b9) Typo in Float documentation ([dfinity/motoko-base#498](https://togithub.com/dfinity/motoko-base/issues/498)) * [`443fcf86`](dfinity/motoko-base@443fcf8) doc: Random module ([dfinity/motoko-base#484](https://togithub.com/dfinity/motoko-base/issues/484)) * [`ed727604`](dfinity/motoko-base@ed72760) doc: add examples to trie ([dfinity/motoko-base#454](https://togithub.com/dfinity/motoko-base/issues/454)) * [`4b472cf9`](dfinity/motoko-base@4b472cf) fix `bitnot` for the `Nat*` family too ([dfinity/motoko-base#504](https://togithub.com/dfinity/motoko-base/issues/504)) * [`78af93bd`](dfinity/motoko-base@78af93b) feat: fix TrieSet.equals, add TrieSet.isEmpty, TrieSet.isSubset; add tests ([dfinity/motoko-base#503](https://togithub.com/dfinity/motoko-base/issues/503)) * [`22152e95`](dfinity/motoko-base@22152e9) bugfix: fix issue [dfinity/motoko-base#492](https://togithub.com/dfinity/motoko-base/issues/492) plus some testing of Random.mo ([dfinity/motoko-base#500](https://togithub.com/dfinity/motoko-base/issues/500)) * [`b2e6e584`](dfinity/motoko-base@b2e6e58) bugfix: fixes [dfinity/motoko-base#448](https://togithub.com/dfinity/motoko-base/issues/448) ([dfinity/motoko-base#505](https://togithub.com/dfinity/motoko-base/issues/505)) * [`f602517f`](dfinity/motoko-base@f602517) Add examples and update docs for Stack ([dfinity/motoko-base#470](https://togithub.com/dfinity/motoko-base/issues/470))
mergify bot
pushed a commit
that referenced
this pull request
Jan 18, 2023
## Changelog for motoko-base: Branch: next-moc Commits: [dfinity/motoko-base@40e2d36e...551acc9a](dfinity/motoko-base@40e2d36...551acc9) * [`3a8d1f44`](dfinity/motoko-base@3a8d1f4) test: List module ([dfinity/motoko-base#457](https://togithub.com/dfinity/motoko-base/issues/457)) * [`d74cc136`](dfinity/motoko-base@d74cc13) Int documentation and unit tests ([dfinity/motoko-base#473](https://togithub.com/dfinity/motoko-base/issues/473)) * [`7171ebe3`](dfinity/motoko-base@7171ebe) Fix typo in Int.neg() function name ([dfinity/motoko-base#479](https://togithub.com/dfinity/motoko-base/issues/479)) * [`85e17dcb`](dfinity/motoko-base@85e17dc) Motoko 0.7.5 * [`489a7595`](dfinity/motoko-base@489a759) Add `Array.size()` * [`15ec733a`](dfinity/motoko-base@15ec733) Fix `Array.size` example * [`bafaab29`](dfinity/motoko-base@bafaab2) Remove extraneous closing brace * [`bc011ec3`](dfinity/motoko-base@bc011ec) Add missing semicolon * [`8e2057d1`](dfinity/motoko-base@8e2057d) fix: import in `Trie.mo` * [`f884484b`](dfinity/motoko-base@f884484) Add 'mo:base' import sanity check * [`70f291d7`](dfinity/motoko-base@70f291d) Add link to PR in reference check file * [`e35fde03`](dfinity/motoko-base@e35fde0) feat: user-facing API for timers ([dfinity/motoko-base#474](https://togithub.com/dfinity/motoko-base/issues/474)) * [`cf74656f`](dfinity/motoko-base@cf74656) doc: Text module ([dfinity/motoko-base#458](https://togithub.com/dfinity/motoko-base/issues/458)) * [`b1d30ec1`](dfinity/motoko-base@b1d30ec) chore: add examples for CertifiedData ([dfinity/motoko-base#469](https://togithub.com/dfinity/motoko-base/issues/469)) * [`a3233a47`](dfinity/motoko-base@a3233a4) doc: ExperimentalStableMemory module ([dfinity/motoko-base#482](https://togithub.com/dfinity/motoko-base/issues/482)) * [`e52bc256`](dfinity/motoko-base@e52bc25) Small typo in CertifiedData ([dfinity/motoko-base#490](https://togithub.com/dfinity/motoko-base/issues/490)) * [`3729c65c`](dfinity/motoko-base@3729c65) Float documentation and unit tests ([dfinity/motoko-base#455](https://togithub.com/dfinity/motoko-base/issues/455)) * [`1fa5240f`](dfinity/motoko-base@1fa5240) Deque documentation and unit tests ([dfinity/motoko-base#465](https://togithub.com/dfinity/motoko-base/issues/465)) * [`a6826315`](dfinity/motoko-base@a682631) RBTree documentation and unit tests ([dfinity/motoko-base#472](https://togithub.com/dfinity/motoko-base/issues/472)) * [`edb24def`](dfinity/motoko-base@edb24de) ExperimentalCycles documentation (no unit tests) ([dfinity/motoko-base#477](https://togithub.com/dfinity/motoko-base/issues/477)) * [`eded1b73`](dfinity/motoko-base@eded1b7) doc: Text module ([dfinity/motoko-base#458](https://togithub.com/dfinity/motoko-base/issues/458)) * [`41736374`](dfinity/motoko-base@4173637) chore: add examples for CertifiedData ([dfinity/motoko-base#469](https://togithub.com/dfinity/motoko-base/issues/469)) * [`f4255ddb`](dfinity/motoko-base@f4255dd) doc: ExperimentalStableMemory module ([dfinity/motoko-base#482](https://togithub.com/dfinity/motoko-base/issues/482)) * [`d99cd69d`](dfinity/motoko-base@d99cd69) Small typo in CertifiedData ([dfinity/motoko-base#490](https://togithub.com/dfinity/motoko-base/issues/490)) * [`859edc14`](dfinity/motoko-base@859edc1) Float documentation and unit tests ([dfinity/motoko-base#455](https://togithub.com/dfinity/motoko-base/issues/455)) * [`384ef6ee`](dfinity/motoko-base@384ef6e) Deque documentation and unit tests ([dfinity/motoko-base#465](https://togithub.com/dfinity/motoko-base/issues/465)) * [`f0cf4da4`](dfinity/motoko-base@f0cf4da) RBTree documentation and unit tests ([dfinity/motoko-base#472](https://togithub.com/dfinity/motoko-base/issues/472)) * [`66a682af`](dfinity/motoko-base@66a682a) ExperimentalCycles documentation (no unit tests) ([dfinity/motoko-base#477](https://togithub.com/dfinity/motoko-base/issues/477)) * [`b4b6caca`](dfinity/motoko-base@b4b6cac) Add `Array.size` ([dfinity/motoko-base#494](https://togithub.com/dfinity/motoko-base/issues/494)) * [`a5910190`](dfinity/motoko-base@a591019) fix: non-local import in `Trie.mo` ([dfinity/motoko-base#495](https://togithub.com/dfinity/motoko-base/issues/495)) * [`823b0b40`](dfinity/motoko-base@823b0b4) Add `Array.size` ([dfinity/motoko-base#494](https://togithub.com/dfinity/motoko-base/issues/494)) * [`4e6a7554`](dfinity/motoko-base@4e6a755) fix: non-local import in `Trie.mo` ([dfinity/motoko-base#495](https://togithub.com/dfinity/motoko-base/issues/495)) * [`98c96a57`](dfinity/motoko-base@98c96a5) doc: add some explanation and improve examples in `Func.mo` ([dfinity/motoko-base#471](https://togithub.com/dfinity/motoko-base/issues/471)) * [`4f8d37b6`](dfinity/motoko-base@4f8d37b) Int8/16/32/64 documentation and unit tests ([dfinity/motoko-base#475](https://togithub.com/dfinity/motoko-base/issues/475)) * [`ef40d9d4`](dfinity/motoko-base@ef40d9d) fix: Base library issues with `Float` ([dfinity/motoko-base#480](https://togithub.com/dfinity/motoko-base/issues/480)) * [`842e2b95`](dfinity/motoko-base@842e2b9) Typo in Float documentation ([dfinity/motoko-base#498](https://togithub.com/dfinity/motoko-base/issues/498)) * [`443fcf86`](dfinity/motoko-base@443fcf8) doc: Random module ([dfinity/motoko-base#484](https://togithub.com/dfinity/motoko-base/issues/484)) * [`ed727604`](dfinity/motoko-base@ed72760) doc: add examples to trie ([dfinity/motoko-base#454](https://togithub.com/dfinity/motoko-base/issues/454)) * [`4b472cf9`](dfinity/motoko-base@4b472cf) fix `bitnot` for the `Nat*` family too ([dfinity/motoko-base#504](https://togithub.com/dfinity/motoko-base/issues/504)) * [`78af93bd`](dfinity/motoko-base@78af93b) feat: fix TrieSet.equals, add TrieSet.isEmpty, TrieSet.isSubset; add tests ([dfinity/motoko-base#503](https://togithub.com/dfinity/motoko-base/issues/503)) * [`22152e95`](dfinity/motoko-base@22152e9) bugfix: fix issue [dfinity/motoko-base#492](https://togithub.com/dfinity/motoko-base/issues/492) plus some testing of Random.mo ([dfinity/motoko-base#500](https://togithub.com/dfinity/motoko-base/issues/500)) * [`b2e6e584`](dfinity/motoko-base@b2e6e58) bugfix: fixes [dfinity/motoko-base#448](https://togithub.com/dfinity/motoko-base/issues/448) ([dfinity/motoko-base#505](https://togithub.com/dfinity/motoko-base/issues/505)) * [`f602517f`](dfinity/motoko-base@f602517) Add examples and update docs for Stack ([dfinity/motoko-base#470](https://togithub.com/dfinity/motoko-base/issues/470))
dfinity-bot
added a commit
that referenced
this pull request
Dec 10, 2023
## Changelog for musl-wasi: Branch: main Commits: [WebAssembly/wasi-libc@9c17f523...a796d874](WebAssembly/wasi-libc@9c17f52...a796d87) * [`a796d874`](WebAssembly/wasi-libc@a796d87) Adjust Makefile for LLVM trunk (18) as of 2023-12-07 ([WebAssembly/wasi-libc#448](https://togithub.com/WebAssembly/wasi-libc/issues/448))
dfinity-bot
added a commit
that referenced
this pull request
Dec 11, 2023
## Changelog for musl-wasi: Branch: main Commits: [WebAssembly/wasi-libc@9c17f523...a796d874](WebAssembly/wasi-libc@9c17f52...a796d87) * [`a796d874`](WebAssembly/wasi-libc@a796d87) Adjust Makefile for LLVM trunk (18) as of 2023-12-07 ([WebAssembly/wasi-libc#448](https://togithub.com/WebAssembly/wasi-libc/issues/448))
mergify bot
pushed a commit
that referenced
this pull request
Dec 11, 2023
## Changelog for musl-wasi: Branch: main Commits: [WebAssembly/wasi-libc@9c17f523...a796d874](WebAssembly/wasi-libc@9c17f52...a796d87) * [`a796d874`](WebAssembly/wasi-libc@a796d87) Adjust Makefile for LLVM trunk (18) as of 2023-12-07 ([WebAssembly/wasi-libc#448](https://togithub.com/WebAssembly/wasi-libc/issues/448))
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.
this is in anticipation of #400.
It extends the previous hack in the backend that recognizes
actor { … }
, and still does not include the necessary changes to the front end for proper error reporting.But it finally allows the produce exchange to use
import
for everything, no longer relying on the concatenation of source files (relevant for #447). I think @matthewhammer will be happy.Also updates the produce exchange and sample apps to use
import
instead of file concatenation; this is in separate commits for easier review.