6d8efa516d912ed4fb3a51abe81181ac5a3ce7de 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  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. }
  12. }
  13. declarations {
  14. interface {
  15. name {
  16. name: "Y"
  17. }
  18. members {
  19. let {
  20. pattern {
  21. generic_binding {
  22. name: "M"
  23. type {
  24. call {
  25. function {
  26. identifier {
  27. name: "X"
  28. }
  29. }
  30. argument {
  31. tuple_literal {
  32. fields {
  33. identifier {
  34. name: "T"
  35. }
  36. }
  37. }
  38. }
  39. }
  40. }
  41. }
  42. }
  43. }
  44. }
  45. }
  46. }
  47. declarations {
  48. interface {
  49. name {
  50. name: "Z"
  51. }
  52. members {
  53. let {
  54. pattern {
  55. generic_binding {
  56. name: "N"
  57. type {
  58. where {
  59. base {
  60. call {
  61. function {
  62. identifier {
  63. name: "Y"
  64. }
  65. }
  66. argument {
  67. tuple_literal {
  68. fields {
  69. designator {
  70. name: "Self"
  71. }
  72. }
  73. }
  74. }
  75. }
  76. }
  77. clauses {
  78. impls {
  79. type {
  80. int_type_literal {
  81. }
  82. }
  83. constraint {
  84. call {
  85. function {
  86. identifier {
  87. name: "X"
  88. }
  89. }
  90. argument {
  91. tuple_literal {
  92. fields {
  93. designator {
  94. name: "Self"
  95. }
  96. }
  97. }
  98. }
  99. }
  100. }
  101. }
  102. }
  103. clauses {
  104. rewrite {
  105. member_name: "M"
  106. replacement {
  107. int_type_literal {
  108. }
  109. }
  110. }
  111. }
  112. }
  113. }
  114. }
  115. }
  116. }
  117. }
  118. }
  119. }
  120. declarations {
  121. impl {
  122. kind: InternalImpl
  123. impl_type {
  124. int_type_literal {
  125. }
  126. }
  127. interface {
  128. call {
  129. function {
  130. identifier {
  131. name: "X"
  132. }
  133. }
  134. argument {
  135. tuple_literal {
  136. fields {
  137. int_type_literal {
  138. }
  139. }
  140. }
  141. }
  142. }
  143. }
  144. }
  145. }
  146. declarations {
  147. impl {
  148. kind: InternalImpl
  149. impl_type {
  150. int_type_literal {
  151. }
  152. }
  153. interface {
  154. where {
  155. base {
  156. call {
  157. function {
  158. identifier {
  159. name: "Y"
  160. }
  161. }
  162. argument {
  163. tuple_literal {
  164. fields {
  165. int_type_literal {
  166. }
  167. }
  168. }
  169. }
  170. }
  171. }
  172. clauses {
  173. rewrite {
  174. member_name: "M"
  175. replacement {
  176. int_type_literal {
  177. }
  178. }
  179. }
  180. }
  181. }
  182. }
  183. }
  184. }
  185. declarations {
  186. impl {
  187. kind: InternalImpl
  188. impl_type {
  189. int_type_literal {
  190. }
  191. }
  192. interface {
  193. where {
  194. base {
  195. identifier {
  196. name: "Z"
  197. }
  198. }
  199. clauses {
  200. rewrite {
  201. member_name: "N"
  202. replacement {
  203. int_type_literal {
  204. }
  205. }
  206. }
  207. }
  208. }
  209. }
  210. }
  211. }
  212. declarations {
  213. function {
  214. name {
  215. name: "F"
  216. }
  217. deduced_parameters {
  218. name: "A"
  219. type {
  220. identifier {
  221. name: "Z"
  222. }
  223. }
  224. }
  225. param_pattern {
  226. fields {
  227. binding_pattern {
  228. name: "a"
  229. type {
  230. expression_pattern {
  231. expression {
  232. identifier {
  233. name: "A"
  234. }
  235. }
  236. }
  237. }
  238. }
  239. }
  240. }
  241. return_term {
  242. kind: Expression
  243. type {
  244. identifier {
  245. name: "A"
  246. }
  247. }
  248. }
  249. body {
  250. statements {
  251. return_expression_statement {
  252. expression {
  253. identifier {
  254. name: "a"
  255. }
  256. }
  257. }
  258. }
  259. }
  260. }
  261. }
  262. declarations {
  263. function {
  264. name {
  265. name: "Main"
  266. }
  267. param_pattern {
  268. }
  269. return_term {
  270. kind: Expression
  271. type {
  272. int_type_literal {
  273. }
  274. }
  275. }
  276. body {
  277. statements {
  278. return_expression_statement {
  279. expression {
  280. call {
  281. function {
  282. identifier {
  283. name: "F"
  284. }
  285. }
  286. argument {
  287. tuple_literal {
  288. fields {
  289. int_literal {
  290. value: 0
  291. }
  292. }
  293. }
  294. }
  295. }
  296. }
  297. }
  298. }
  299. }
  300. }
  301. }
  302. }