compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    interface {
      name {
        name: "Vector"
      }
      members {
        let {
          pattern {
            generic_binding {
              name: "Dim"
              type {
                int_type_literal {
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: ExternalImpl
      impl_type {
        tuple_literal {
          fields {
            int_type_literal {
            }
          }
          fields {
            int_type_literal {
            }
          }
          fields {
            int_type_literal {
            }
          }
        }
      }
      interface {
        where {
          base {
            identifier {
              name: "Vector"
            }
          }
          clauses {
            rewrite {
              member_name: "Dim"
              replacement {
                int_literal {
                  value: 3
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    class_declaration {
      name {
        name: "Point"
      }
      type_params {
        fields {
          generic_binding {
            name: "Scalar"
            type {
              type_type_literal {
              }
            }
          }
        }
        fields {
          generic_binding {
            name: "Dim"
            type {
              int_type_literal {
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "F"
      }
      deduced_parameters {
        name: "Scalar"
        type {
          type_type_literal {
          }
        }
      }
      deduced_parameters {
        name: "V"
        type {
          where {
            base {
              identifier {
                name: "Vector"
              }
            }
            clauses {
              equals {
                lhs {
                  designator {
                    name: "Dim"
                  }
                }
                rhs {
                  int_literal {
                    value: 3
                  }
                }
              }
            }
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "p"
            type {
              expression_pattern {
                expression {
                  call {
                    function {
                      identifier {
                        name: "Point"
                      }
                    }
                    argument {
                      tuple_literal {
                        fields {
                          identifier {
                            name: "Scalar"
                          }
                        }
                        fields {
                          simple_member_access {
                            field: "Dim"
                            object {
                              identifier {
                                name: "V"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        fields {
          binding_pattern {
            name: "v"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "V"
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Omitted
      }
      body {
      }
    }
  }
  declarations {
    function {
      name {
        name: "G"
      }
      deduced_parameters {
        name: "Scalar"
        type {
          type_type_literal {
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "p"
            type {
              expression_pattern {
                expression {
                  call {
                    function {
                      identifier {
                        name: "Point"
                      }
                    }
                    argument {
                      tuple_literal {
                        fields {
                          identifier {
                            name: "Scalar"
                          }
                        }
                        fields {
                          int_literal {
                            value: 3
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Omitted
      }
      body {
      }
    }
  }
  declarations {
    function {
      name {
        name: "H"
      }
      deduced_parameters {
        name: "V"
        type {
          where {
            base {
              identifier {
                name: "Vector"
              }
            }
            clauses {
              equals {
                lhs {
                  designator {
                    name: "Dim"
                  }
                }
                rhs {
                  int_literal {
                    value: 3
                  }
                }
              }
            }
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "v"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "V"
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Omitted
      }
      body {
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "p"
                type {
                  expression_pattern {
                    expression {
                      call {
                        function {
                          identifier {
                            name: "Point"
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              int_type_literal {
                              }
                            }
                            fields {
                              simple_member_access {
                                field: "Dim"
                                object {
                                  identifier {
                                    name: "V"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
              }
            }
            is_returned: false
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "G"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "p"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "Main"
      }
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "p"
                type {
                  expression_pattern {
                    expression {
                      call {
                        function {
                          identifier {
                            name: "Point"
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              int_type_literal {
                              }
                            }
                            fields {
                              int_literal {
                                value: 3
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
              }
            }
            is_returned: false
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "F"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "p"
                      }
                    }
                    fields {
                      tuple_literal {
                        fields {
                          int_literal {
                            value: 0
                          }
                        }
                        fields {
                          int_literal {
                            value: 0
                          }
                        }
                        fields {
                          int_literal {
                            value: 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "H"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      tuple_literal {
                        fields {
                          int_literal {
                            value: 0
                          }
                        }
                        fields {
                          int_literal {
                            value: 0
                          }
                        }
                        fields {
                          int_literal {
                            value: 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          return_expression_statement {
            expression {
              int_literal {
                value: 0
              }
            }
          }
        }
      }
    }
  }
}
