-
Notifications
You must be signed in to change notification settings - Fork 46
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
Export all arities for a function, foundations of function imports #84
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
Haven't done the proper AST rewriting yet. My intention is to rewrite any local reference to a function that doesn't exist to an inter-module application using the first import that satisfies it during the rebinding stage of AST generation.
This was suggested in alpaca-lang#63. It's not actually part of the AST generation phase yet but it made sense to handle this at the same time as function imports for alpaca-lang#62. I'm going to decouple the basic parsing pass from the renaming and rewriting pass of the parser since rewriting the names of imported functions to inter-module calls will require the other modules to already be parsed and accessible.
Not yet integrated into the actual parsing path.
* fix whitespace regex to cover whitespace other than spaces * fix block comment regex to cover more edge cases * fix line comment regex * add basic framework for property based testing using proper * property test for compiling generated module declarations
make_modules/1 takes a list of source code strings to parse and rewrite as proper modules with imports and exports expanded. Expanded exports now work so we can do things like `export foo` instead of `export foo/1, foo/2`. Rewriting functions not defined in the module to inter-module calls using imports is not yet done but I think because of the increasing amount of changes it's worth integrating now, if only to get the export changes in. Fixes alpaca-lang#63
…nore-ws Add 'let' to top level definitions; infer breaks using top-level keywords
Add more property tests
make_modules/1 takes a list of source code strings to parse and rewrite as proper modules with imports and exports expanded. Expanded exports now work so we can do things like `export foo` instead of `export foo/1, foo/2`. Rewriting functions not defined in the module to inter-module calls using imports is not yet done but I think because of the increasing amount of changes it's worth integrating now, if only to get the export changes in. Fixes alpaca-lang#63
This was suggested in alpaca-lang#63. It's not actually part of the AST generation phase yet but it made sense to handle this at the same time as function imports for alpaca-lang#62. I'm going to decouple the basic parsing pass from the renaming and rewriting pass of the parser since rewriting the names of imported functions to inter-module calls will require the other modules to already be parsed and accessible.
Not yet integrated into the actual parsing path.
make_modules/1 takes a list of source code strings to parse and rewrite as proper modules with imports and exports expanded. Expanded exports now work so we can do things like `export foo` instead of `export foo/1, foo/2`. Rewriting functions not defined in the module to inter-module calls using imports is not yet done but I think because of the increasing amount of changes it's worth integrating now, if only to get the export changes in. Fixes alpaca-lang#63
make_modules/1 takes a list of source code strings to parse and rewrite as proper modules with imports and exports expanded. Expanded exports now work so we can do things like `export foo` instead of `export foo/1, foo/2`. Rewriting functions not defined in the module to inter-module calls using imports is not yet done but I think because of the increasing amount of changes it's worth integrating now, if only to get the export changes in. Fixes alpaca-lang#63
Rather than adding the set of available modules as another parameter, thread an environment record through the rewriting stages that tracks all of this stuff and makes it easier to expand upon later if necessary.
Added top-level `let`s since I was alread in there.
* fix whitespace regex to cover whitespace other than spaces * fix block comment regex to cover more edge cases * fix line comment regex * add basic framework for property based testing using proper * property test for compiling generated module declarations
make_modules/1 takes a list of source code strings to parse and rewrite as proper modules with imports and exports expanded. Expanded exports now work so we can do things like `export foo` instead of `export foo/1, foo/2`. Rewriting functions not defined in the module to inter-module calls using imports is not yet done but I think because of the increasing amount of changes it's worth integrating now, if only to get the export changes in. Fixes alpaca-lang#63
make_modules/1 takes a list of source code strings to parse and rewrite as proper modules with imports and exports expanded. Expanded exports now work so we can do things like `export foo` instead of `export foo/1, foo/2`. Rewriting functions not defined in the module to inter-module calls using imports is not yet done but I think because of the increasing amount of changes it's worth integrating now, if only to get the export changes in. Fixes alpaca-lang#63
This was suggested in alpaca-lang#63. It's not actually part of the AST generation phase yet but it made sense to handle this at the same time as function imports for alpaca-lang#62. I'm going to decouple the basic parsing pass from the renaming and rewriting pass of the parser since rewriting the names of imported functions to inter-module calls will require the other modules to already be parsed and accessible.
Not yet integrated into the actual parsing path.
make_modules/1 takes a list of source code strings to parse and rewrite as proper modules with imports and exports expanded. Expanded exports now work so we can do things like `export foo` instead of `export foo/1, foo/2`. Rewriting functions not defined in the module to inter-module calls using imports is not yet done but I think because of the increasing amount of changes it's worth integrating now, if only to get the export changes in. Fixes alpaca-lang#63
make_modules/1 takes a list of source code strings to parse and rewrite as proper modules with imports and exports expanded. Expanded exports now work so we can do things like `export foo` instead of `export foo/1, foo/2`. Rewriting functions not defined in the module to inter-module calls using imports is not yet done but I think because of the increasing amount of changes it's worth integrating now, if only to get the export changes in. Fixes alpaca-lang#63
* fix whitespace regex to cover whitespace other than spaces * fix block comment regex to cover more edge cases * fix line comment regex * add basic framework for property based testing using proper * property test for compiling generated module declarations
Haven't done the proper AST rewriting yet. My intention is to rewrite any local reference to a function that doesn't exist to an inter-module application using the first import that satisfies it during the rebinding stage of AST generation.
This was suggested in alpaca-lang#63. It's not actually part of the AST generation phase yet but it made sense to handle this at the same time as function imports for alpaca-lang#62. I'm going to decouple the basic parsing pass from the renaming and rewriting pass of the parser since rewriting the names of imported functions to inter-module calls will require the other modules to already be parsed and accessible.
Was ping-ponging merging upstream alpaca master into my import-funs branch and my remote import-funs branch back into mine. The merge mostly amounted to fixing some whitespace conflicts, ordering of two function versions and removing a test that doesn't appear to be in upstream alpaca's master anyhow.
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.
Fixes #63 and contains the beginnings of function imports from #62. Wanted to integrate this now as it doesn't break anything since we don't have function imports at the moment.