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

[ConstraintSystem] Reformat type inference debug output to use | #61396

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

amritpan
Copy link
Member

@amritpan amritpan commented Sep 30, 2022

This replaces the () grouping in the type inference debug output to use | instead to make it easier to follow nested solver steps.

  | Potential Binding(s): 
  `- $T1 [attributes: delayed, [literal: integer]] [with possible bindings: (default type of literal) Int]
  `- $T2 [attributes: delayed, [literal: string]] [with possible bindings: (default type of literal) String]
  `- Disjunction(s) = [$T0]
  {
    !> Attempting disjunction choice $T0 bound to decl Swift.(file).String extension.+ : (String.Type) -> (String, String) -> String [[locator@0x13e9bae00 [OverloadedDeclRef@/Users/amritpankaur/test.swift:81:3]]];
    |  Overload set choice binding $T0 := (String, String) -> String
    |
    `-> Considering -> (_const $T1, _const $T2) -> $T3 applicable fn $T0 [[locator@0x13e9bc5f0 [Binary@/Users/amritpankaur/test.swift:81:3 -> apply function]]];
    |  `- Simplification result:
    |    `- Added constraint: $T1 operator arg conv String [[locator@0x13e9bc6c0 [Binary@/Users/amritpankaur/test.swift:81:3 -> apply argument -> comparing call argument #0 to parameter #0]]];)
    |    `- Added constraint: $T2 operator arg conv String [[locator@0x13e9bc760 [Binary@/Users/amritpankaur/test.swift:81:3 -> apply argument -> comparing call argument #1 to parameter #1]]];)
    |    `- Removed constraint: (_const $T1, _const $T2) -> $T3 applicable fn $T0 [[locator@0x13e9bc5f0 [Binary@/Users/amritpankaur/test.swift:81:3 -> apply function]]];
    |  `-- Outcome: simplified
    |
    |  * Changes:
    |  | Newly Bound: 
    |  |  > $T0 := (String, String) -> String
    |  |  > $T3 := String
    |  | Added Constraints: 
    |  |  > $T1 operator arg conv String [[locator@0x13e9bc6c0 [Binary@/Users/amritpankaur/test.swift:81:3 -> apply argument -> comparing call argument #0 to parameter #0]]];
    |  |  > $T2 operator arg conv String [[locator@0x13e9bc760 [Binary@/Users/amritpankaur/test.swift:81:3 -> apply argument -> comparing call argument #1 to parameter #1]]];
    |  | Removed Constraint: 
    |  |  > (_const $T1, _const $T2) -> $T3 applicable fn $T0 [[locator@0x13e9bc5f0 [Binary@/Users/amritpankaur/test.swift:81:3 -> apply function]]];
    |
    ...
  }

@amritpan amritpan changed the title Redecorate [ConstraintSystem] Reformat type inference debug output to use | Sep 30, 2022
@amritpan amritpan force-pushed the redecorate branch 2 times, most recently from 813f124 to 38f49de Compare October 3, 2022 18:17
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.

None yet

2 participants