compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    interface {
      name {
        name: "Iface"
      }
      members {
        let {
          pattern {
            generic_binding {
              name: "N"
              type {
                int_type_literal {
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "PickType"
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "N"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          type_type_literal {
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              int_type_literal {
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "F"
      }
      deduced_parameters {
        name: "T"
        type {
          identifier {
            name: "Iface"
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "x"
                type {
                  expression_pattern {
                    expression {
                      call {
                        function {
                          identifier {
                            name: "PickType"
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              simple_member_access {
                                field: "N"
                                object {
                                  identifier {
                                    name: "T"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              int_literal {
                value: 0
              }
            }
            is_returned: false
          }
        }
        statements {
          return_expression_statement {
            expression {
              identifier {
                name: "x"
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: InternalImpl
      impl_type {
        int_type_literal {
        }
      }
      interface {
        where {
          base {
            identifier {
              name: "Iface"
            }
          }
          clauses {
            rewrite {
              member_name: "N"
              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_literal {
                        value: 0
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
