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

convert: unify tuples as lists and objects as maps when possible #89

Merged
merged 4 commits into from
Mar 10, 2021

Commits on Mar 8, 2021

  1. unify test cases

    jbardin committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    4c7486d View commit details
    Browse the repository at this point in the history
  2. special case unifying tuples as lists

    List data is often contained within tuple types, either do to language
    constructs (hcl tuple literals) or function return types. When presented
    with only lists and tuples for unification, first check if the tuples
    themselves unify as lists. If they do, run the unification again with
    only the list types, and wrap the conversions as necessary.
    jbardin committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    d021849 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2021

  1. unify objects as maps

    Like tuples and lists, objects and maps are often just different types
    wrapped around the same data structures. When unifying combinations of
    objects and maps, first see if the objects will unify as maps allowing
    the possible unification of all arguments to maps.
    jbardin committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    b4144f6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4f50d5e View commit details
    Browse the repository at this point in the history