Skip to content

WIP: Stdlib and PX use 'import' to relate files#315

Closed
matthewhammer wants to merge 3 commits intomasterfrom
matthew/px/imports
Closed

WIP: Stdlib and PX use 'import' to relate files#315
matthewhammer wants to merge 3 commits intomasterfrom
matthew/px/imports

Conversation

@matthewhammer
Copy link
Contributor

@matthewhammer matthewhammer commented Apr 15, 2019

This PR attempts to:

  • use import to relate the files of stdlib and the produce exchange (PX).
  • simplify the stdlib Makefile, so that each invocation of asc generally takes a single .as file, as opposed to the entire list of files upon which this file depends.

However, I already foresee a few questions/issues that need further attention:

  • Since import essentially performs expression substitution, "library files" need to end with a unit value, to satisfy the type checker (e.g., see the edit for prelude.as that ends that file with ()); do we want this semantics?
  • What happens when a.as is imported by b.as and c.as, and then d.as imports b.as and c.as --- should we get errors about multiple definitions for the contents of a.as (now transitively imported twice into d.as)? As an example, I suspect that very common modules like prelude.as or hash.as could play the role of a.as here, and fall victim to this kind of "duplication".
  • The compiler is overflowing its stack now; still need to investigate the details...

cc @nomeata


Also, there are some non-critical, tangential odds and ends here too:

  • update the emacs mode to include new keywords

Loading
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.

2 participants