compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    interface {
      name {
        name: "X"
      }
    }
  }
  declarations {
    interface {
      name {
        name: "Y"
      }
      members {
        let {
          pattern {
            generic_binding {
              name: "M"
              type {
                call {
                  function {
                    identifier {
                      name: "X"
                    }
                  }
                  argument {
                    tuple_literal {
                      fields {
                        identifier {
                          name: "T"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    interface {
      name {
        name: "Z"
      }
      members {
        let {
          pattern {
            generic_binding {
              name: "N"
              type {
                where {
                  base {
                    call {
                      function {
                        identifier {
                          name: "Y"
                        }
                      }
                      argument {
                        tuple_literal {
                          fields {
                            designator {
                              name: "Self"
                            }
                          }
                        }
                      }
                    }
                  }
                  clauses {
                    rewrite {
                      member_name: "M"
                      replacement {
                        int_type_literal {
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "Main"
      }
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              int_literal {
                value: 0
              }
            }
          }
        }
      }
    }
  }
}
