89bf648a72b186cde6349d5948d0fa6d5ad455de 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. interface {
  8. name {
  9. name: "X"
  10. }
  11. members {
  12. function {
  13. name {
  14. name: "F"
  15. }
  16. param_pattern {
  17. }
  18. return_term {
  19. kind: Omitted
  20. }
  21. }
  22. }
  23. }
  24. }
  25. declarations {
  26. impl {
  27. kind: InternalImpl
  28. impl_type {
  29. int_type_literal {
  30. }
  31. }
  32. interface {
  33. identifier {
  34. name: "X"
  35. }
  36. }
  37. members {
  38. function {
  39. name {
  40. name: "F"
  41. }
  42. param_pattern {
  43. }
  44. return_term {
  45. kind: Omitted
  46. }
  47. body {
  48. }
  49. }
  50. }
  51. }
  52. }
  53. declarations {
  54. function {
  55. name {
  56. name: "G"
  57. }
  58. deduced_parameters {
  59. name: "T"
  60. type {
  61. identifier {
  62. name: "X"
  63. }
  64. }
  65. }
  66. param_pattern {
  67. fields {
  68. binding_pattern {
  69. name: "v"
  70. type {
  71. expression_pattern {
  72. expression {
  73. identifier {
  74. name: "T"
  75. }
  76. }
  77. }
  78. }
  79. }
  80. }
  81. }
  82. return_term {
  83. kind: Expression
  84. type {
  85. type_type_literal {
  86. }
  87. }
  88. }
  89. body {
  90. statements {
  91. expression_statement {
  92. expression {
  93. call {
  94. function {
  95. simple_member_access {
  96. field: "F"
  97. object {
  98. identifier {
  99. name: "v"
  100. }
  101. }
  102. }
  103. }
  104. argument {
  105. tuple_literal {
  106. }
  107. }
  108. }
  109. }
  110. }
  111. }
  112. statements {
  113. return_expression_statement {
  114. expression {
  115. int_type_literal {
  116. }
  117. }
  118. }
  119. }
  120. }
  121. }
  122. }
  123. declarations {
  124. function {
  125. name {
  126. name: "Main"
  127. }
  128. param_pattern {
  129. }
  130. return_term {
  131. kind: Expression
  132. type {
  133. int_type_literal {
  134. }
  135. }
  136. }
  137. body {
  138. statements {
  139. variable_definition {
  140. pattern {
  141. binding_pattern {
  142. name: "v"
  143. type {
  144. expression_pattern {
  145. expression {
  146. call {
  147. function {
  148. identifier {
  149. name: "G"
  150. }
  151. }
  152. argument {
  153. tuple_literal {
  154. fields {
  155. int_literal {
  156. value: 0
  157. }
  158. }
  159. }
  160. }
  161. }
  162. }
  163. }
  164. }
  165. }
  166. }
  167. init {
  168. int_literal {
  169. value: 0
  170. }
  171. }
  172. is_returned: false
  173. }
  174. }
  175. statements {
  176. return_expression_statement {
  177. expression {
  178. identifier {
  179. name: "v"
  180. }
  181. }
  182. }
  183. }
  184. }
  185. }
  186. }
  187. }