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

Standard Usage Patterns #17

Open
1 task
Tracked by #23
jdonszelmann opened this issue Apr 19, 2024 · 3 comments
Open
1 task
Tracked by #23

Standard Usage Patterns #17

jdonszelmann opened this issue Apr 19, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@jdonszelmann
Copy link
Collaborator

How do you do certain things in scopegraphs?

  • Simple identifier name resolution
@jdonszelmann jdonszelmann added the documentation Improvements or additions to documentation label Apr 19, 2024
This was referenced Apr 19, 2024
@AZWN
Copy link
Collaborator

AZWN commented Apr 19, 2024

Some other ideas:

  • Modules
    • Nested
    • Transitive imports
    • Named imports
    • Hiding
  • Composite types (records/classes)
  • Qualified names

@AZWN
Copy link
Collaborator

AZWN commented Apr 19, 2024

Perhaps also type inference (unification variables in scope graph declarations)

@AZWN
Copy link
Collaborator

AZWN commented Apr 19, 2024

We should have examples for sequenced and non-sequenced structures. For example, what is a scope graph for the program in which imports open over the subsequent scope:

mod A {
  def x = v + 2 n
  import B
  mod B {
    def w = x * 2
  }
  def y = w + 1
  def v = 1
}

mod C {
  val z = A.y * A.B.w
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants