Skip to content
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
merged 161 commits into from
Jan 11, 2017

Conversation

j14159
Copy link
Collaborator

@j14159 j14159 commented Dec 30, 2016

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.

j14159 and others added 30 commits December 22, 2016 19:12
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
lepoetemaudit and others added 28 commits January 7, 2017 15:12
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.
@j14159 j14159 merged commit 045e92c into alpaca-lang:master Jan 11, 2017
@j14159 j14159 deleted the import-funs branch January 11, 2017 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants