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

Avoid concatenating Text values in termToPat. #1272

Merged
merged 1 commit into from
Sep 15, 2021
Merged

Avoid concatenating Text values in termToPat. #1272

merged 1 commit into from
Sep 15, 2021

Commits on Sep 14, 2021

  1. Avoid concatenating Text values in termToPat.

    Fixes #1263.
    
    We now use `identBaseName` instead of `identText` in the `termToPat`
    definition. While `identText` concatenates the module name and base
    name, `identBaseName` just returns the base name directly.
    
    Using only the base name means that there is a chance of name collisions
    between constants that differ only by module name. However, term nets
    are only used as an approximate filter prior to term matching; it is
    not a problem if a few extra hits are returned from time to time.
    
    Ultimately it might be better to replace the use of `Text` in the term
    net `Atom` constructor with a more specialized key type; for example
    with `ExtCns` names we could use the `VarIndex` for matching. However,
    this would require modifying the term net library.
    Brian Huffman committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    1c74cf4 View commit details
    Browse the repository at this point in the history