de53043af63bcefa34668c2616de2a4bb376c7d8 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. function {
  8. name {
  9. name: "F"
  10. }
  11. deduced_parameters {
  12. name: "T"
  13. type {
  14. call {
  15. function {
  16. identifier {
  17. name: "ImplicitAs"
  18. }
  19. }
  20. argument {
  21. tuple_literal {
  22. fields {
  23. type_type_literal {
  24. }
  25. }
  26. }
  27. }
  28. }
  29. }
  30. }
  31. param_pattern {
  32. fields {
  33. binding_pattern {
  34. name: "x"
  35. type {
  36. expression_pattern {
  37. expression {
  38. identifier {
  39. name: "T"
  40. }
  41. }
  42. }
  43. }
  44. }
  45. }
  46. }
  47. return_term {
  48. kind: Expression
  49. type {
  50. type_type_literal {
  51. }
  52. }
  53. }
  54. body {
  55. statements {
  56. return_expression_statement {
  57. expression {
  58. identifier {
  59. name: "x"
  60. }
  61. }
  62. }
  63. }
  64. }
  65. }
  66. }
  67. declarations {
  68. function {
  69. name {
  70. name: "Main"
  71. }
  72. param_pattern {
  73. }
  74. return_term {
  75. kind: Expression
  76. type {
  77. int_type_literal {
  78. }
  79. }
  80. }
  81. body {
  82. statements {
  83. variable_definition {
  84. pattern {
  85. binding_pattern {
  86. name: "v"
  87. type {
  88. expression_pattern {
  89. expression {
  90. operator {
  91. op: As
  92. arguments {
  93. tuple_literal {
  94. fields {
  95. int_type_literal {
  96. }
  97. }
  98. fields {
  99. int_type_literal {
  100. }
  101. }
  102. }
  103. }
  104. arguments {
  105. type_type_literal {
  106. }
  107. }
  108. }
  109. }
  110. }
  111. }
  112. }
  113. }
  114. init {
  115. tuple_literal {
  116. fields {
  117. int_literal {
  118. value: 1
  119. }
  120. }
  121. fields {
  122. int_literal {
  123. value: 2
  124. }
  125. }
  126. }
  127. }
  128. is_returned: false
  129. }
  130. }
  131. statements {
  132. variable_definition {
  133. pattern {
  134. binding_pattern {
  135. name: "w"
  136. type {
  137. expression_pattern {
  138. expression {
  139. call {
  140. function {
  141. identifier {
  142. name: "F"
  143. }
  144. }
  145. argument {
  146. tuple_literal {
  147. fields {
  148. tuple_literal {
  149. fields {
  150. int_type_literal {
  151. }
  152. }
  153. fields {
  154. int_type_literal {
  155. }
  156. }
  157. }
  158. }
  159. }
  160. }
  161. }
  162. }
  163. }
  164. }
  165. }
  166. }
  167. init {
  168. tuple_literal {
  169. fields {
  170. int_literal {
  171. value: 3
  172. }
  173. }
  174. fields {
  175. int_literal {
  176. value: 4
  177. }
  178. }
  179. }
  180. }
  181. is_returned: false
  182. }
  183. }
  184. statements {
  185. assign {
  186. lhs {
  187. identifier {
  188. name: "v"
  189. }
  190. }
  191. rhs {
  192. identifier {
  193. name: "w"
  194. }
  195. }
  196. op: Plain
  197. }
  198. }
  199. statements {
  200. return_expression_statement {
  201. expression {
  202. index {
  203. object {
  204. identifier {
  205. name: "v"
  206. }
  207. }
  208. offset {
  209. int_literal {
  210. value: 1
  211. }
  212. }
  213. }
  214. }
  215. }
  216. }
  217. }
  218. }
  219. }
  220. }