compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    interface {
      name {
        name: "HasTypeAndValue"
      }
      members {
        let {
          pattern {
            generic_binding {
              name: "T"
              type {
                type_type_literal {
                }
              }
            }
          }
        }
      }
      members {
        let {
          pattern {
            generic_binding {
              name: "V"
              type {
                identifier {
                  name: "T"
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "F"
      }
      param_pattern {
        fields {
          generic_binding {
            name: "X"
            type {
              where {
                base {
                  identifier {
                    name: "HasTypeAndValue"
                  }
                }
                clauses {
                  rewrite {
                    member_name: "T"
                    replacement {
                      int_type_literal {
                      }
                    }
                  }
                }
                clauses {
                  rewrite {
                    member_name: "V"
                    replacement {
                      int_literal {
                        value: 5
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              simple_member_access {
                field: "V"
                object {
                  identifier {
                    name: "X"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: InternalImpl
      impl_type {
        int_type_literal {
        }
      }
      interface {
        where {
          base {
            identifier {
              name: "HasTypeAndValue"
            }
          }
          clauses {
            rewrite {
              member_name: "T"
              replacement {
                int_type_literal {
                }
              }
            }
          }
          clauses {
            rewrite {
              member_name: "V"
              replacement {
                int_literal {
                  value: 5
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "Main"
      }
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "F"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
