---
cases:
  - data:
      a:
        - 1
        - 2
        - 3
        - 4
    modules:
      - |
        package generated

        p[x] {
          __local0__ = data.a[i]
          x = [i, __local0__]
        }
    note: partialsetdoc/composite var value
    query: data.generated.p = x
    sort_bindings: true
    want_result:
      - x:
          - - 0
            - 1
          - - 1
            - 2
          - - 2
            - 3
          - - 3
            - 4
