compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    interface {
      name {
        name: "SwizzleWith"
      }
      members {
        function {
          name {
            name: "Op"
          }
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
            fields {
              binding_pattern {
                name: "x"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "T"
                      }
                    }
                  }
                }
              }
            }
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
        }
      }
    }
  }
  declarations {
    alias {
      name {
        name: "Swizzle"
      }
      target {
        where {
          base {
            type_type_literal {
            }
          }
          clauses {
            impls {
              type {
                designator {
                  name: "Self"
                }
              }
              constraint {
                call {
                  function {
                    identifier {
                      name: "SwizzleWith"
                    }
                  }
                  argument {
                    tuple_literal {
                      fields {
                        designator {
                          name: "Self"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: InternalImpl
      impl_type {
        int_type_literal {
        }
      }
      interface {
        call {
          function {
            identifier {
              name: "SwizzleWith"
            }
          }
          argument {
            tuple_literal {
              fields {
                int_type_literal {
                }
              }
            }
          }
        }
      }
      members {
        function {
          name {
            name: "Op"
          }
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
            fields {
              binding_pattern {
                name: "x"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "Self"
                      }
                    }
                  }
                }
              }
            }
          }
          return_term {
            kind: Expression
            type {
              identifier {
                name: "Self"
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  operator {
                    op: Add
                    arguments {
                      operator {
                        op: Mul
                        arguments {
                          identifier {
                            name: "self"
                          }
                        }
                        arguments {
                          int_literal {
                            value: 10
                          }
                        }
                      }
                    }
                    arguments {
                      identifier {
                        name: "x"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "F"
      }
      deduced_parameters {
        name: "T"
        type {
          identifier {
            name: "Swizzle"
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "v"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
        fields {
          binding_pattern {
            name: "w"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              call {
                function {
                  compound_member_access {
                    object {
                      identifier {
                        name: "v"
                      }
                    }
                    path {
                      simple_member_access {
                        field: "Op"
                        object {
                          call {
                            function {
                              identifier {
                                name: "SwizzleWith"
                              }
                            }
                            argument {
                              tuple_literal {
                                fields {
                                  identifier {
                                    name: "T"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "w"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "Main"
      }
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "one"
                type {
                  expression_pattern {
                    expression {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
            init {
              int_literal {
                value: 1
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "two"
                type {
                  expression_pattern {
                    expression {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
            init {
              int_literal {
                value: 2
              }
            }
            is_returned: false
          }
        }
        statements {
          return_expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "F"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "one"
                      }
                    }
                    fields {
                      identifier {
                        name: "two"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

