compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    function {
      name {
        name: "apply"
      }
      deduced_parameters {
        name: "T"
        type {
          type_type_literal {
          }
        }
      }
      deduced_parameters {
        name: "U"
        type {
          type_type_literal {
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "f"
            type {
              expression_pattern {
                expression {
                  function_type {
                    return_type {
                      identifier {
                        name: "U"
                      }
                    }
                    parameter {
                      fields {
                        identifier {
                          name: "T"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          identifier {
            name: "U"
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "f"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "x"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "positive"
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  bool_type_literal {
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          if_statement {
            condition {
              identifier {
                name: "x"
              }
            }
            then_block {
              statements {
                return_expression_statement {
                  expression {
                    int_literal {
                      value: 2
                    }
                  }
                }
              }
            }
            else_block {
              statements {
                return_expression_statement {
                  expression {
                    operator {
                      op: Neg
                      arguments {
                        int_literal {
                          value: 2
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  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: "apply"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "positive"
                      }
                    }
                    fields {
                      bool_literal {
                        value: false
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
