hinmil 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2306 -2
  3. package/dist/cli.d.ts +15 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +338 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/commentParser.d.ts +384 -0
  8. package/dist/commentParser.d.ts.map +1 -0
  9. package/dist/commentParser.js +2487 -0
  10. package/dist/commentParser.js.map +1 -0
  11. package/dist/config.d.ts +203 -0
  12. package/dist/config.d.ts.map +1 -0
  13. package/dist/config.js +375 -0
  14. package/dist/config.js.map +1 -0
  15. package/dist/debugLog.d.ts +13 -0
  16. package/dist/debugLog.d.ts.map +1 -0
  17. package/dist/debugLog.js +44 -0
  18. package/dist/debugLog.js.map +1 -0
  19. package/dist/estree.d.ts +100 -0
  20. package/dist/estree.d.ts.map +1 -0
  21. package/dist/estree.js +34 -0
  22. package/dist/estree.js.map +1 -0
  23. package/dist/hm/env.d.ts +134 -0
  24. package/dist/hm/env.d.ts.map +1 -0
  25. package/dist/hm/env.js +939 -0
  26. package/dist/hm/env.js.map +1 -0
  27. package/dist/hm/index.d.ts +7 -0
  28. package/dist/hm/index.d.ts.map +1 -0
  29. package/dist/hm/index.js +26 -0
  30. package/dist/hm/index.js.map +1 -0
  31. package/dist/hm/substitution.d.ts +57 -0
  32. package/dist/hm/substitution.d.ts.map +1 -0
  33. package/dist/hm/substitution.js +546 -0
  34. package/dist/hm/substitution.js.map +1 -0
  35. package/dist/hm/typeParser.d.ts +39 -0
  36. package/dist/hm/typeParser.d.ts.map +1 -0
  37. package/dist/hm/typeParser.js +1285 -0
  38. package/dist/hm/typeParser.js.map +1 -0
  39. package/dist/hm/typeUtils.d.ts +248 -0
  40. package/dist/hm/typeUtils.d.ts.map +1 -0
  41. package/dist/hm/typeUtils.js +905 -0
  42. package/dist/hm/typeUtils.js.map +1 -0
  43. package/dist/hm/types.d.ts +738 -0
  44. package/dist/hm/types.d.ts.map +1 -0
  45. package/dist/hm/types.js +1853 -0
  46. package/dist/hm/types.js.map +1 -0
  47. package/dist/hm/unify.d.ts +59 -0
  48. package/dist/hm/unify.d.ts.map +1 -0
  49. package/dist/hm/unify.js +1700 -0
  50. package/dist/hm/unify.js.map +1 -0
  51. package/dist/index.d.ts +20 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +196 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/infer/annotation-rigid.d.ts +76 -0
  56. package/dist/infer/annotation-rigid.d.ts.map +1 -0
  57. package/dist/infer/annotation-rigid.js +542 -0
  58. package/dist/infer/annotation-rigid.js.map +1 -0
  59. package/dist/infer/annotation-validation.d.ts +109 -0
  60. package/dist/infer/annotation-validation.d.ts.map +1 -0
  61. package/dist/infer/annotation-validation.js +1078 -0
  62. package/dist/infer/annotation-validation.js.map +1 -0
  63. package/dist/infer/annotations.d.ts +277 -0
  64. package/dist/infer/annotations.d.ts.map +1 -0
  65. package/dist/infer/annotations.js +1343 -0
  66. package/dist/infer/annotations.js.map +1 -0
  67. package/dist/infer/call-overloads.d.ts +24 -0
  68. package/dist/infer/call-overloads.d.ts.map +1 -0
  69. package/dist/infer/call-overloads.js +900 -0
  70. package/dist/infer/call-overloads.js.map +1 -0
  71. package/dist/infer/call-rows.d.ts +154 -0
  72. package/dist/infer/call-rows.d.ts.map +1 -0
  73. package/dist/infer/call-rows.js +2162 -0
  74. package/dist/infer/call-rows.js.map +1 -0
  75. package/dist/infer/calls.d.ts +20 -0
  76. package/dist/infer/calls.d.ts.map +1 -0
  77. package/dist/infer/calls.js +1468 -0
  78. package/dist/infer/calls.js.map +1 -0
  79. package/dist/infer/constraints.d.ts +99 -0
  80. package/dist/infer/constraints.d.ts.map +1 -0
  81. package/dist/infer/constraints.js +1208 -0
  82. package/dist/infer/constraints.js.map +1 -0
  83. package/dist/infer/expr-assignment.d.ts +20 -0
  84. package/dist/infer/expr-assignment.d.ts.map +1 -0
  85. package/dist/infer/expr-assignment.js +620 -0
  86. package/dist/infer/expr-assignment.js.map +1 -0
  87. package/dist/infer/expr-constraint-lookup.d.ts +44 -0
  88. package/dist/infer/expr-constraint-lookup.d.ts.map +1 -0
  89. package/dist/infer/expr-constraint-lookup.js +207 -0
  90. package/dist/infer/expr-constraint-lookup.js.map +1 -0
  91. package/dist/infer/expr-functions.d.ts +20 -0
  92. package/dist/infer/expr-functions.d.ts.map +1 -0
  93. package/dist/infer/expr-functions.js +1359 -0
  94. package/dist/infer/expr-functions.js.map +1 -0
  95. package/dist/infer/expr-jsx.d.ts +19 -0
  96. package/dist/infer/expr-jsx.d.ts.map +1 -0
  97. package/dist/infer/expr-jsx.js +310 -0
  98. package/dist/infer/expr-jsx.js.map +1 -0
  99. package/dist/infer/expr-member.d.ts +40 -0
  100. package/dist/infer/expr-member.d.ts.map +1 -0
  101. package/dist/infer/expr-member.js +1154 -0
  102. package/dist/infer/expr-member.js.map +1 -0
  103. package/dist/infer/expr-prototype.d.ts +11 -0
  104. package/dist/infer/expr-prototype.d.ts.map +1 -0
  105. package/dist/infer/expr-prototype.js +202 -0
  106. package/dist/infer/expr-prototype.js.map +1 -0
  107. package/dist/infer/expressions.d.ts +40 -0
  108. package/dist/infer/expressions.d.ts.map +1 -0
  109. package/dist/infer/expressions.js +1497 -0
  110. package/dist/infer/expressions.js.map +1 -0
  111. package/dist/infer/functionPatterns.d.ts +229 -0
  112. package/dist/infer/functionPatterns.d.ts.map +1 -0
  113. package/dist/infer/functionPatterns.js +1035 -0
  114. package/dist/infer/functionPatterns.js.map +1 -0
  115. package/dist/infer/helpers.d.ts +73 -0
  116. package/dist/infer/helpers.d.ts.map +1 -0
  117. package/dist/infer/helpers.js +187 -0
  118. package/dist/infer/helpers.js.map +1 -0
  119. package/dist/infer/index.d.ts +551 -0
  120. package/dist/infer/index.d.ts.map +1 -0
  121. package/dist/infer/index.js +1127 -0
  122. package/dist/infer/index.js.map +1 -0
  123. package/dist/infer/jsx-dom.d.ts +26 -0
  124. package/dist/infer/jsx-dom.d.ts.map +1 -0
  125. package/dist/infer/jsx-dom.js +303 -0
  126. package/dist/infer/jsx-dom.js.map +1 -0
  127. package/dist/infer/moduleReps.d.ts +7 -0
  128. package/dist/infer/moduleReps.d.ts.map +1 -0
  129. package/dist/infer/moduleReps.js +48 -0
  130. package/dist/infer/moduleReps.js.map +1 -0
  131. package/dist/infer/modules.d.ts +10 -0
  132. package/dist/infer/modules.d.ts.map +1 -0
  133. package/dist/infer/modules.js +775 -0
  134. package/dist/infer/modules.js.map +1 -0
  135. package/dist/infer/narrowing.d.ts +199 -0
  136. package/dist/infer/narrowing.d.ts.map +1 -0
  137. package/dist/infer/narrowing.js +1428 -0
  138. package/dist/infer/narrowing.js.map +1 -0
  139. package/dist/infer/results.d.ts +24 -0
  140. package/dist/infer/results.d.ts.map +1 -0
  141. package/dist/infer/results.js +611 -0
  142. package/dist/infer/results.js.map +1 -0
  143. package/dist/infer/setupPass.d.ts +11 -0
  144. package/dist/infer/setupPass.d.ts.map +1 -0
  145. package/dist/infer/setupPass.js +524 -0
  146. package/dist/infer/setupPass.js.map +1 -0
  147. package/dist/infer/statements.d.ts +26 -0
  148. package/dist/infer/statements.d.ts.map +1 -0
  149. package/dist/infer/statements.js +750 -0
  150. package/dist/infer/statements.js.map +1 -0
  151. package/dist/infer/stmt-bindings.d.ts +22 -0
  152. package/dist/infer/stmt-bindings.d.ts.map +1 -0
  153. package/dist/infer/stmt-bindings.js +1482 -0
  154. package/dist/infer/stmt-bindings.js.map +1 -0
  155. package/dist/infer/stmt-destructure.d.ts +29 -0
  156. package/dist/infer/stmt-destructure.d.ts.map +1 -0
  157. package/dist/infer/stmt-destructure.js +490 -0
  158. package/dist/infer/stmt-destructure.js.map +1 -0
  159. package/dist/infer/types.d.ts +220 -0
  160. package/dist/infer/types.d.ts.map +1 -0
  161. package/dist/infer/types.js +46 -0
  162. package/dist/infer/types.js.map +1 -0
  163. package/dist/infer/unifyDiag.d.ts +46 -0
  164. package/dist/infer/unifyDiag.d.ts.map +1 -0
  165. package/dist/infer/unifyDiag.js +642 -0
  166. package/dist/infer/unifyDiag.js.map +1 -0
  167. package/dist/parsing-babel.d.ts +3 -0
  168. package/dist/parsing-babel.d.ts.map +1 -0
  169. package/dist/parsing-babel.js +353 -0
  170. package/dist/parsing-babel.js.map +1 -0
  171. package/dist/parsing.d.ts +69 -0
  172. package/dist/parsing.d.ts.map +1 -0
  173. package/dist/parsing.js +288 -0
  174. package/dist/parsing.js.map +1 -0
  175. package/dist/registries/constraintRegistry.d.ts +233 -0
  176. package/dist/registries/constraintRegistry.d.ts.map +1 -0
  177. package/dist/registries/constraintRegistry.js +803 -0
  178. package/dist/registries/constraintRegistry.js.map +1 -0
  179. package/dist/registries/dataTypeRegistry.d.ts +63 -0
  180. package/dist/registries/dataTypeRegistry.d.ts.map +1 -0
  181. package/dist/registries/dataTypeRegistry.js +180 -0
  182. package/dist/registries/dataTypeRegistry.js.map +1 -0
  183. package/dist/registries/domGlobals.d.ts +33 -0
  184. package/dist/registries/domGlobals.d.ts.map +1 -0
  185. package/dist/registries/domGlobals.js +309 -0
  186. package/dist/registries/domGlobals.js.map +1 -0
  187. package/dist/registries/methodRegistry.d.ts +277 -0
  188. package/dist/registries/methodRegistry.d.ts.map +1 -0
  189. package/dist/registries/methodRegistry.js +2074 -0
  190. package/dist/registries/methodRegistry.js.map +1 -0
  191. package/dist/registries/session.d.ts +38 -0
  192. package/dist/registries/session.d.ts.map +1 -0
  193. package/dist/registries/session.js +75 -0
  194. package/dist/registries/session.js.map +1 -0
  195. package/dist/server.d.ts +2 -0
  196. package/dist/server.d.ts.map +1 -0
  197. package/dist/server.js +1896 -0
  198. package/dist/server.js.map +1 -0
  199. package/dist/services/codeActions.d.ts +22 -0
  200. package/dist/services/codeActions.d.ts.map +1 -0
  201. package/dist/services/codeActions.js +465 -0
  202. package/dist/services/codeActions.js.map +1 -0
  203. package/dist/services/completion.d.ts +259 -0
  204. package/dist/services/completion.d.ts.map +1 -0
  205. package/dist/services/completion.js +2794 -0
  206. package/dist/services/completion.js.map +1 -0
  207. package/dist/services/definitions.d.ts +37 -0
  208. package/dist/services/definitions.d.ts.map +1 -0
  209. package/dist/services/definitions.js +605 -0
  210. package/dist/services/definitions.js.map +1 -0
  211. package/dist/services/diagnosticCodes.d.ts +70 -0
  212. package/dist/services/diagnosticCodes.d.ts.map +1 -0
  213. package/dist/services/diagnosticCodes.js +239 -0
  214. package/dist/services/diagnosticCodes.js.map +1 -0
  215. package/dist/services/diagnostics.d.ts +86 -0
  216. package/dist/services/diagnostics.d.ts.map +1 -0
  217. package/dist/services/diagnostics.js +665 -0
  218. package/dist/services/diagnostics.js.map +1 -0
  219. package/dist/services/documentCache.d.ts +88 -0
  220. package/dist/services/documentCache.d.ts.map +1 -0
  221. package/dist/services/documentCache.js +108 -0
  222. package/dist/services/documentCache.js.map +1 -0
  223. package/dist/services/documentSymbols.d.ts +20 -0
  224. package/dist/services/documentSymbols.d.ts.map +1 -0
  225. package/dist/services/documentSymbols.js +381 -0
  226. package/dist/services/documentSymbols.js.map +1 -0
  227. package/dist/services/fileSelection.d.ts +24 -0
  228. package/dist/services/fileSelection.d.ts.map +1 -0
  229. package/dist/services/fileSelection.js +154 -0
  230. package/dist/services/fileSelection.js.map +1 -0
  231. package/dist/services/fileSelectionRefresh.d.ts +26 -0
  232. package/dist/services/fileSelectionRefresh.d.ts.map +1 -0
  233. package/dist/services/fileSelectionRefresh.js +77 -0
  234. package/dist/services/fileSelectionRefresh.js.map +1 -0
  235. package/dist/services/files.d.ts +342 -0
  236. package/dist/services/files.d.ts.map +1 -0
  237. package/dist/services/files.js +1712 -0
  238. package/dist/services/files.js.map +1 -0
  239. package/dist/services/fsProbe.d.ts +14 -0
  240. package/dist/services/fsProbe.d.ts.map +1 -0
  241. package/dist/services/fsProbe.js +112 -0
  242. package/dist/services/fsProbe.js.map +1 -0
  243. package/dist/services/globalsLoader.d.ts +20 -0
  244. package/dist/services/globalsLoader.d.ts.map +1 -0
  245. package/dist/services/globalsLoader.js +122 -0
  246. package/dist/services/globalsLoader.js.map +1 -0
  247. package/dist/services/hmFileServices.d.ts +113 -0
  248. package/dist/services/hmFileServices.d.ts.map +1 -0
  249. package/dist/services/hmFileServices.js +686 -0
  250. package/dist/services/hmFileServices.js.map +1 -0
  251. package/dist/services/hover.d.ts +280 -0
  252. package/dist/services/hover.d.ts.map +1 -0
  253. package/dist/services/hover.js +1687 -0
  254. package/dist/services/hover.js.map +1 -0
  255. package/dist/services/importContext.d.ts +396 -0
  256. package/dist/services/importContext.d.ts.map +1 -0
  257. package/dist/services/importContext.js +1999 -0
  258. package/dist/services/importContext.js.map +1 -0
  259. package/dist/services/projectChecker.d.ts +50 -0
  260. package/dist/services/projectChecker.d.ts.map +1 -0
  261. package/dist/services/projectChecker.js +228 -0
  262. package/dist/services/projectChecker.js.map +1 -0
  263. package/dist/services/references.d.ts +41 -0
  264. package/dist/services/references.d.ts.map +1 -0
  265. package/dist/services/references.js +757 -0
  266. package/dist/services/references.js.map +1 -0
  267. package/dist/services/rename.d.ts +22 -0
  268. package/dist/services/rename.d.ts.map +1 -0
  269. package/dist/services/rename.js +101 -0
  270. package/dist/services/rename.js.map +1 -0
  271. package/dist/services/shortCircuit.d.ts +27 -0
  272. package/dist/services/shortCircuit.d.ts.map +1 -0
  273. package/dist/services/shortCircuit.js +28 -0
  274. package/dist/services/shortCircuit.js.map +1 -0
  275. package/dist/services/sidecarPerf.d.ts +19 -0
  276. package/dist/services/sidecarPerf.d.ts.map +1 -0
  277. package/dist/services/sidecarPerf.js +59 -0
  278. package/dist/services/sidecarPerf.js.map +1 -0
  279. package/dist/services/signatureHelp.d.ts +27 -0
  280. package/dist/services/signatureHelp.d.ts.map +1 -0
  281. package/dist/services/signatureHelp.js +984 -0
  282. package/dist/services/signatureHelp.js.map +1 -0
  283. package/dist/walking.d.ts +25 -0
  284. package/dist/walking.d.ts.map +1 -0
  285. package/dist/walking.js +107 -0
  286. package/dist/walking.js.map +1 -0
  287. package/hm-types-builtin/assert.hm +20 -0
  288. package/hm-types-builtin/buffer.hm +8 -0
  289. package/hm-types-builtin/child_process.hm +16 -0
  290. package/hm-types-builtin/crypto.hm +17 -0
  291. package/hm-types-builtin/fs.hm +15 -0
  292. package/hm-types-builtin/http.hm +14 -0
  293. package/hm-types-builtin/os.hm +19 -0
  294. package/hm-types-builtin/path.hm +18 -0
  295. package/hm-types-builtin/react-dom.hm +27 -0
  296. package/hm-types-builtin/react.hm +113 -0
  297. package/hm-types-builtin/url.hm +7 -0
  298. package/hm-types-builtin/zlib.hm +12 -0
  299. package/package.json +53 -4
  300. package/schemas/hinmil.config.schema.json +261 -0
  301. package/schemas/package-hinmil.schema.json +59 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/services/diagnostics.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,8DAA8D;AAC9D,EAAE;AACF,0EAA0E;AAC1E,4EAA4E;AAC5E,2EAA2E;AAC3E,sEAAsE;AACtE,8DAA8D;AAC9D,+EAA+E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8B/E,0CAQC;AAoBD,0DAwCC;AAwLD,0DA0JC;AAsFD,4DAKC;AAoBD,kFAOC;AAcD,0EAWC;AAeD,0DAYC;AAYD,wDAiCC;AAQD,sDAyBC;AA1qBD,qDAMoC;AAIpC,iDAAmC;AAEnC,wCAAyC;AACzC,oDAA8F;AAC9F,qEAA+E;AAC/E,uDAA0H;AAC1H,mCAA8C;AAC9C,mCAAiD;AAEjD,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E;;;;GAIG;AACH,SAAgB,eAAe,CAAC,KAAsB;IACpD,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC;QACxB,KAAK,MAAM,CAAC,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;QACtE,IAAI,SAAS,IAAI,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7C,MAAM,KAAK,GAAG,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;YAChD,MAAM,GAAG,GAAG,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YAC7D,WAAW,CAAC,IAAI,CAAC;gBACf,QAAQ,EAAE,yBAAkB,CAAC,OAAO;gBACpC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;gBACrB,OAAO,EAAE,qBAAqB,SAAS,0CAA0C;gBACjF,MAAM,EAAE,QAAQ;gBAChB,IAAI,EAAE,oCAAkB;aACzB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -0,0 +1,88 @@
1
+ import { Diagnostic } from 'vscode-languageserver/node';
2
+ import { InferenceResult } from '../index';
3
+ /** Cached inference results per document URI — used by code actions and other features. */
4
+ export declare const cachedResults: Map<string, InferenceResult>;
5
+ /**
6
+ * Per-document source-text fingerprint. When `validateTextDocument` is
7
+ * called and the source text is identical to the last seen value (e.g. the
8
+ * user pressed undo/redo, or the editor sent overlapping change notifications
9
+ * that produced the same final document), we skip the expensive re-parse +
10
+ * re-inference and reuse the cached `InferenceResult` directly. Cleared
11
+ * in `onDidClose` along with `cachedResults`.
12
+ */
13
+ export declare const lastValidatedSource: Map<string, string>;
14
+ /** Per-document globals generation at the time it was last validated. */
15
+ export declare const validatedUnderGeneration: Map<string, number>;
16
+ /**
17
+ * Per-document snapshot of the diagnostics array we most recently published
18
+ * for that URI. The source-identity short-circuit re-publishes this snapshot
19
+ * so the editor always reflects the diagnostics that correspond to the file's
20
+ * current text — without this, an undo back to a previously validated text
21
+ * would leave the editor showing whichever diagnostics the LAST validation
22
+ * pass had emitted (which, for the intermediate edit, may differ from the
23
+ * original validation's diagnostics).
24
+ */
25
+ export declare const lastPublishedDiagnostics: Map<string, Diagnostic[]>;
26
+ /**
27
+ * Per-document snapshot of the import-module-specifier list extracted from
28
+ * the source on the last validation pass. When the new validation pass
29
+ * extracts the same list, we can skip the eager dependency pre-warm loop
30
+ * (which calls `inferFileAndCacheExports` for every imported file) — the
31
+ * underlying file-level cache is idempotent, but iterating + resolving
32
+ * specifiers on every keystroke adds up on files with many imports.
33
+ */
34
+ export declare const lastImportSpecifiers: Map<string, string[]>;
35
+ /**
36
+ * Per-document snapshot of the source text observed at the start of the
37
+ * previous `onDidChangeContent` event. Used by the word-boundary gate
38
+ * (see {@link computeCaretOffset}) to derive the caret position of the
39
+ * latest edit by diffing prev↔curr. Distinct from `lastValidatedSource`,
40
+ * which only updates after a successful validation pass.
41
+ */
42
+ export declare const lastSeenSource: Map<string, string>;
43
+ /**
44
+ * Per-document {offset, at} for the most recent edit. `offset` is the
45
+ * caret position immediately after the edit; `at` is the wall-clock time
46
+ * the edit arrived. Read by the word-boundary gate in
47
+ * `validateTextDocument` to decide whether the cursor is currently
48
+ * mid-identifier (in which case validation is deferred to avoid
49
+ * generating noisy `Unbound variable: 'foo'` diagnostics on incomplete
50
+ * identifiers).
51
+ */
52
+ export declare const lastEditPosition: Map<string, {
53
+ offset: number;
54
+ at: number;
55
+ }>;
56
+ /**
57
+ * Request-path inference cache: recent inference results keyed by the EXACT
58
+ * source text that was inferred (a few slots per URI — the original text
59
+ * plus ASI-patched variants). Request handlers (hover, signature help,
60
+ * completion providers) that need to infer a not-yet-validated document
61
+ * version consult this first, so the N providers of a single completion
62
+ * request — and repeated requests on an unchanged document — pay for at
63
+ * most ONE inference per source version instead of one each. Edits
64
+ * self-invalidate (the key is the exact text); dependency/config changes
65
+ * must evict entries explicitly (see `invalidateFileSelf` /
66
+ * `reloadGlobals` in server.ts).
67
+ */
68
+ export declare const requestInferCache: Map<string, {
69
+ key: string;
70
+ result: InferenceResult;
71
+ }[]>;
72
+ /** Max cached source-text variants per URI in {@link requestInferCache}. */
73
+ export declare const REQUEST_INFER_SLOTS = 3;
74
+ /** Wall-clock budget (ms) within which the word-boundary gate defers
75
+ * validation when the caret is mid-identifier. After this elapsed
76
+ * without further edits we accept the user really paused inside a
77
+ * partial word and validate anyway (any `Unbound variable` diagnostic
78
+ * is then legitimate). */
79
+ export declare const WORD_BOUNDARY_GATE_MS = 3000;
80
+ /** Word-character predicate used to identify identifier boundaries. */
81
+ export declare function isIdentChar(c: string | undefined): boolean;
82
+ /**
83
+ * Compute the caret offset of the latest edit by diffing the previous
84
+ * text against the current text. The caret is, by construction, at the
85
+ * end of the inserted (or deleted) range. Pure / synchronous / O(n).
86
+ */
87
+ export declare function computeCaretOffset(prev: string, curr: string): number;
88
+ //# sourceMappingURL=documentCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentCache.d.ts","sourceRoot":"","sources":["../../src/services/documentCache.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,2FAA2F;AAC3F,eAAO,MAAM,aAAa,8BAAqC,CAAC;AAEhE;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,qBAA4B,CAAC;AAE7D,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,qBAA4B,CAAC;AAElE;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,2BAAkC,CAAC;AAExE;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,uBAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,qBAA4B,CAAC;AAExD;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;YAA6B,MAAM;QAAM,MAAM;EAAK,CAAC;AAElF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB;SAAgC,MAAM;YAAU,eAAe;IAAM,CAAC;AAEpG,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC;;;;2BAI2B;AAC3B,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAO1D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAWrE"}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ // ============================================================================
3
+ // Per-document caches and edit-tracking state for the language server.
4
+ //
5
+ // Extracted from server.ts. These module-level singletons hold the
6
+ // per-URI validation caches and the word-boundary-gate bookkeeping;
7
+ // server.ts imports and mutates them directly (same identity as before).
8
+ // ============================================================================
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.WORD_BOUNDARY_GATE_MS = exports.REQUEST_INFER_SLOTS = exports.requestInferCache = exports.lastEditPosition = exports.lastSeenSource = exports.lastImportSpecifiers = exports.lastPublishedDiagnostics = exports.validatedUnderGeneration = exports.lastValidatedSource = exports.cachedResults = void 0;
11
+ exports.isIdentChar = isIdentChar;
12
+ exports.computeCaretOffset = computeCaretOffset;
13
+ /** Cached inference results per document URI — used by code actions and other features. */
14
+ exports.cachedResults = new Map();
15
+ /**
16
+ * Per-document source-text fingerprint. When `validateTextDocument` is
17
+ * called and the source text is identical to the last seen value (e.g. the
18
+ * user pressed undo/redo, or the editor sent overlapping change notifications
19
+ * that produced the same final document), we skip the expensive re-parse +
20
+ * re-inference and reuse the cached `InferenceResult` directly. Cleared
21
+ * in `onDidClose` along with `cachedResults`.
22
+ */
23
+ exports.lastValidatedSource = new Map();
24
+ /** Per-document globals generation at the time it was last validated. */
25
+ exports.validatedUnderGeneration = new Map();
26
+ /**
27
+ * Per-document snapshot of the diagnostics array we most recently published
28
+ * for that URI. The source-identity short-circuit re-publishes this snapshot
29
+ * so the editor always reflects the diagnostics that correspond to the file's
30
+ * current text — without this, an undo back to a previously validated text
31
+ * would leave the editor showing whichever diagnostics the LAST validation
32
+ * pass had emitted (which, for the intermediate edit, may differ from the
33
+ * original validation's diagnostics).
34
+ */
35
+ exports.lastPublishedDiagnostics = new Map();
36
+ /**
37
+ * Per-document snapshot of the import-module-specifier list extracted from
38
+ * the source on the last validation pass. When the new validation pass
39
+ * extracts the same list, we can skip the eager dependency pre-warm loop
40
+ * (which calls `inferFileAndCacheExports` for every imported file) — the
41
+ * underlying file-level cache is idempotent, but iterating + resolving
42
+ * specifiers on every keystroke adds up on files with many imports.
43
+ */
44
+ exports.lastImportSpecifiers = new Map();
45
+ /**
46
+ * Per-document snapshot of the source text observed at the start of the
47
+ * previous `onDidChangeContent` event. Used by the word-boundary gate
48
+ * (see {@link computeCaretOffset}) to derive the caret position of the
49
+ * latest edit by diffing prev↔curr. Distinct from `lastValidatedSource`,
50
+ * which only updates after a successful validation pass.
51
+ */
52
+ exports.lastSeenSource = new Map();
53
+ /**
54
+ * Per-document {offset, at} for the most recent edit. `offset` is the
55
+ * caret position immediately after the edit; `at` is the wall-clock time
56
+ * the edit arrived. Read by the word-boundary gate in
57
+ * `validateTextDocument` to decide whether the cursor is currently
58
+ * mid-identifier (in which case validation is deferred to avoid
59
+ * generating noisy `Unbound variable: 'foo'` diagnostics on incomplete
60
+ * identifiers).
61
+ */
62
+ exports.lastEditPosition = new Map();
63
+ /**
64
+ * Request-path inference cache: recent inference results keyed by the EXACT
65
+ * source text that was inferred (a few slots per URI — the original text
66
+ * plus ASI-patched variants). Request handlers (hover, signature help,
67
+ * completion providers) that need to infer a not-yet-validated document
68
+ * version consult this first, so the N providers of a single completion
69
+ * request — and repeated requests on an unchanged document — pay for at
70
+ * most ONE inference per source version instead of one each. Edits
71
+ * self-invalidate (the key is the exact text); dependency/config changes
72
+ * must evict entries explicitly (see `invalidateFileSelf` /
73
+ * `reloadGlobals` in server.ts).
74
+ */
75
+ exports.requestInferCache = new Map();
76
+ /** Max cached source-text variants per URI in {@link requestInferCache}. */
77
+ exports.REQUEST_INFER_SLOTS = 3;
78
+ /** Wall-clock budget (ms) within which the word-boundary gate defers
79
+ * validation when the caret is mid-identifier. After this elapsed
80
+ * without further edits we accept the user really paused inside a
81
+ * partial word and validate anyway (any `Unbound variable` diagnostic
82
+ * is then legitimate). */
83
+ exports.WORD_BOUNDARY_GATE_MS = 3000;
84
+ /** Word-character predicate used to identify identifier boundaries. */
85
+ function isIdentChar(c) {
86
+ return c !== undefined && ((c >= 'a' && c <= 'z')
87
+ || (c >= 'A' && c <= 'Z')
88
+ || (c >= '0' && c <= '9')
89
+ || c === '_' || c === '$');
90
+ }
91
+ /**
92
+ * Compute the caret offset of the latest edit by diffing the previous
93
+ * text against the current text. The caret is, by construction, at the
94
+ * end of the inserted (or deleted) range. Pure / synchronous / O(n).
95
+ */
96
+ function computeCaretOffset(prev, curr) {
97
+ let p = 0;
98
+ const maxP = Math.min(prev.length, curr.length);
99
+ while (p < maxP && prev.charCodeAt(p) === curr.charCodeAt(p))
100
+ p++;
101
+ let s = 0;
102
+ const maxS = Math.min(prev.length - p, curr.length - p);
103
+ while (s < maxS
104
+ && prev.charCodeAt(prev.length - 1 - s) === curr.charCodeAt(curr.length - 1 - s))
105
+ s++;
106
+ return curr.length - s;
107
+ }
108
+ //# sourceMappingURL=documentCache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentCache.js","sourceRoot":"","sources":["../../src/services/documentCache.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,uEAAuE;AACvE,EAAE;AACF,oEAAoE;AACpE,oEAAoE;AACpE,yEAAyE;AACzE,+EAA+E;;;AAuF/E,kCAOC;AAOD,gDAWC;AA3GD,2FAA2F;AAC9E,QAAA,aAAa,GAAG,IAAI,GAAG,EAA2B,CAAC;AAEhE;;;;;;;GAOG;AACU,QAAA,mBAAmB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAE7D,yEAAyE;AAC5D,QAAA,wBAAwB,GAAG,IAAI,GAAG,E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C,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACxD,OACE,CAAC,GAAG,IAAI;WACL,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;QAChF,CAAC,EAAE,CAAC;IACN,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { DocumentSymbol } from 'vscode-languageserver/node';
2
+ import { InferenceResult } from '../infer/types';
3
+ export interface DocumentSymbolContext {
4
+ /** Most recent inference result for the file. */
5
+ result: InferenceResult;
6
+ /** User preference: 'pretty' or 'raw'. */
7
+ inferredTypeStyle: 'pretty' | 'raw';
8
+ }
9
+ /**
10
+ * Generate DocumentSymbol[] for the given source and inference result.
11
+ *
12
+ * The symbols are hierarchical:
13
+ * - Top-level declarations (const, function, class, export) form the root.
14
+ * - Method annotations (Name#method) are nested under the corresponding
15
+ * constructor/object symbol.
16
+ * - sumtype declarations become Enum symbols with variant EnumMembers.
17
+ * - Type aliases become Interface symbols.
18
+ */
19
+ export declare function getDocumentSymbols(source: string, ctx: DocumentSymbolContext): DocumentSymbol[];
20
+ //# sourceMappingURL=documentSymbols.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentSymbols.d.ts","sourceRoot":"","sources":["../../src/services/documentSymbols.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,cAAc,EAIf,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAQjD,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,MAAM,EAAE,eAAe,CAAC;IACxB,0CAA0C;IAC1C,iBAAiB,EAAE,QAAQ,GAAG,KAAK,CAAC;CACrC;AA2ND;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,qBAAqB,GACzB,cAAc,EAAE,CAsLlB"}
@@ -0,0 +1,381 @@
1
+ "use strict";
2
+ // ============================================================================
3
+ // Document Symbols — outline / breadcrumbs for navigation
4
+ //
5
+ // Plain language: powers the editor's Outline panel and the breadcrumb bar:
6
+ // a table of contents of the file (functions, classes, constants), each with
7
+ // its inferred type as detail text.
8
+ // ============================================================================
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getDocumentSymbols = getDocumentSymbols;
11
+ const node_1 = require("vscode-languageserver/node");
12
+ const parsing_1 = require("../parsing");
13
+ const types_1 = require("../hm/types");
14
+ const commentParser_1 = require("../commentParser");
15
+ // ---------------------------------------------------------------------------
16
+ // Helpers
17
+ // ---------------------------------------------------------------------------
18
+ /** Convert a 0-based offset to an LSP Position. */
19
+ function positionAt(source, offset) {
20
+ let line = 0;
21
+ let character = 0;
22
+ for (let i = 0; i < offset && i < source.length; i++) {
23
+ if (source[i] === '\n') {
24
+ line++;
25
+ character = 0;
26
+ }
27
+ else {
28
+ character++;
29
+ }
30
+ }
31
+ return { line, character };
32
+ }
33
+ /** Build an LSP Range from two offsets within source. */
34
+ function rangeOf(source, start, end) {
35
+ return node_1.Range.create(positionAt(source, start), positionAt(source, end));
36
+ }
37
+ /** Format a Scheme for the symbol detail string. */
38
+ function formatScheme(scheme, style) {
39
+ const fmt = style === 'pretty' ? types_1.prettyTypeToString : types_1.typeToString;
40
+ const typeStr = fmt(scheme.type);
41
+ if (scheme.constraints && scheme.constraints.length > 0) {
42
+ const renderC = (c) => {
43
+ if (c.unionAlternatives && c.unionAlternatives.length > 0) {
44
+ const alts = c.unionAlternatives.map(a => {
45
+ const s = fmt(a);
46
+ return a.tag === 'TFun' ? `(${s})` : s;
47
+ }).join(' | ');
48
+ return `(${alts}) ${c.typeVarName}`;
49
+ }
50
+ return `${c.className} ${c.typeVarName}`;
51
+ };
52
+ const cstr = scheme.constraints.length === 1
53
+ ? `${renderC(scheme.constraints[0])} => `
54
+ : `(${scheme.constraints.map(renderC).join(', ')}) => `;
55
+ return cstr + typeStr;
56
+ }
57
+ return typeStr;
58
+ }
59
+ /**
60
+ * Determine whether a Type looks like a function type.
61
+ * Recognises both `TFun` (arrow) and `TCon("Function", ...)`.
62
+ */
63
+ function isFunctionType(t) {
64
+ if (t.tag === 'TFun')
65
+ return true;
66
+ if (t.tag === 'TCon' && t.name === 'Function')
67
+ return true;
68
+ return false;
69
+ }
70
+ /**
71
+ * Determine whether a name is a constructor-like identifier
72
+ * (starts with upper-case letter).
73
+ */
74
+ function isConstructorName(name) {
75
+ return /^[A-Z]/.test(name);
76
+ }
77
+ /**
78
+ * Choose an appropriate SymbolKind based on the name and inferred type.
79
+ */
80
+ function classifySymbol(name, scheme) {
81
+ if (scheme && isFunctionType(scheme.type)) {
82
+ // Uppercase + function → constructor / class-like
83
+ if (isConstructorName(name))
84
+ return node_1.SymbolKind.Constructor;
85
+ return node_1.SymbolKind.Function;
86
+ }
87
+ // Non-function values
88
+ if (isConstructorName(name))
89
+ return node_1.SymbolKind.Constructor;
90
+ return node_1.SymbolKind.Variable;
91
+ }
92
+ /**
93
+ * Extract a declared name + its offsets from a VariableDeclarator node.
94
+ * Handles normal identifiers; skips destructuring patterns (those appear
95
+ * as separate individual bindings in nodeTypes).
96
+ */
97
+ function extractDeclarator(declarator, declStart, declEnd) {
98
+ if (declarator.id?.type === 'Identifier') {
99
+ return {
100
+ name: declarator.id.name,
101
+ fullStart: declStart,
102
+ fullEnd: declEnd,
103
+ selStart: declarator.id.start,
104
+ selEnd: declarator.id.end,
105
+ exported: false,
106
+ };
107
+ }
108
+ return null;
109
+ }
110
+ /**
111
+ * Walk the top-level AST body and extract raw symbols.
112
+ */
113
+ function extractRawSymbols(ast) {
114
+ const symbols = [];
115
+ for (const node of ast.body) {
116
+ switch (node.type) {
117
+ case 'VariableDeclaration':
118
+ for (const decl of node.declarations) {
119
+ const sym = extractDeclarator(decl, node.start, node.end);
120
+ if (sym)
121
+ symbols.push(sym);
122
+ }
123
+ break;
124
+ case 'FunctionDeclaration':
125
+ if (node.id) {
126
+ symbols.push({
127
+ name: node.id.name,
128
+ fullStart: node.start,
129
+ fullEnd: node.end,
130
+ selStart: node.id.start,
131
+ selEnd: node.id.end,
132
+ exported: false,
133
+ });
134
+ }
135
+ break;
136
+ case 'ClassDeclaration':
137
+ if (node.id) {
138
+ symbols.push({
139
+ name: node.id.name,
140
+ fullStart: node.start,
141
+ fullEnd: node.end,
142
+ selStart: node.id.start,
143
+ selEnd: node.id.end,
144
+ exported: false,
145
+ });
146
+ }
147
+ break;
148
+ case 'ExportNamedDeclaration':
149
+ if (node.declaration) {
150
+ const inner = node.declaration;
151
+ if (inner.type === 'VariableDeclaration') {
152
+ for (const decl of inner.declarations) {
153
+ const sym = extractDeclarator(decl, node.start, node.end);
154
+ if (sym) {
155
+ sym.exported = true;
156
+ symbols.push(sym);
157
+ }
158
+ }
159
+ }
160
+ else if (inner.type === 'FunctionDeclaration' && inner.id) {
161
+ symbols.push({
162
+ name: inner.id.name,
163
+ fullStart: node.start,
164
+ fullEnd: node.end,
165
+ selStart: inner.id.start,
166
+ selEnd: inner.id.end,
167
+ exported: true,
168
+ });
169
+ }
170
+ else if (inner.type === 'ClassDeclaration' && inner.id) {
171
+ symbols.push({
172
+ name: inner.id.name,
173
+ fullStart: node.start,
174
+ fullEnd: node.end,
175
+ selStart: inner.id.start,
176
+ selEnd: inner.id.end,
177
+ exported: true,
178
+ });
179
+ }
180
+ }
181
+ break;
182
+ case 'ExportDefaultDeclaration':
183
+ if (node.declaration) {
184
+ const decl = node.declaration;
185
+ const id = 'id' in decl ? decl.id : undefined;
186
+ const name = id?.name ?? 'default';
187
+ symbols.push({
188
+ name,
189
+ fullStart: node.start,
190
+ fullEnd: node.end,
191
+ selStart: id ? id.start : node.start,
192
+ selEnd: id ? id.end : node.start + 'export default'.length,
193
+ exported: true,
194
+ });
195
+ }
196
+ break;
197
+ }
198
+ }
199
+ return symbols;
200
+ }
201
+ // ---------------------------------------------------------------------------
202
+ // Main entry point
203
+ // ---------------------------------------------------------------------------
204
+ /**
205
+ * Generate DocumentSymbol[] for the given source and inference result.
206
+ *
207
+ * The symbols are hierarchical:
208
+ * - Top-level declarations (const, function, class, export) form the root.
209
+ * - Method annotations (Name#method) are nested under the corresponding
210
+ * constructor/object symbol.
211
+ * - sumtype declarations become Enum symbols with variant EnumMembers.
212
+ * - Type aliases become Interface symbols.
213
+ */
214
+ function getDocumentSymbols(source, ctx) {
215
+ const { result, inferredTypeStyle } = ctx;
216
+ // --- Parse AST ---
217
+ let ast;
218
+ try {
219
+ ast = (0, parsing_1.parseStrict)(source);
220
+ }
221
+ catch {
222
+ return [];
223
+ }
224
+ const rawSymbols = extractRawSymbols(ast);
225
+ const symbols = [];
226
+ /** Map parent name → children (for method nesting). */
227
+ const childrenByParent = new Map();
228
+ // --- Collect method annotations (Name#method) and private members (Name##name) ---
229
+ for (const [annName, ann] of result.annotations) {
230
+ if (!annName.includes('#'))
231
+ continue;
232
+ // Detect the private form `Class##name` first; otherwise it would split
233
+ // into `['Class', '', 'name']` and produce a DocumentSymbol with an
234
+ // empty `name`, which the LSP client rejects with "name must not be falsy".
235
+ const privIdx = annName.indexOf('##');
236
+ let parentName;
237
+ let methodName;
238
+ let kind;
239
+ if (privIdx >= 0) {
240
+ parentName = annName.slice(0, privIdx);
241
+ methodName = '#' + annName.slice(privIdx + 2);
242
+ kind = node_1.SymbolKind.Field;
243
+ }
244
+ else {
245
+ const parts = annName.split('#', 2);
246
+ parentName = parts[0];
247
+ methodName = parts[1];
248
+ kind = node_1.SymbolKind.Method;
249
+ }
250
+ if (!parentName || !methodName)
251
+ continue;
252
+ // Prefer the user's verbatim annotation text over a re-printed scheme.
253
+ const detail = ann.raw ?? (ann.scheme ? formatScheme(ann.scheme, inferredTypeStyle) : undefined);
254
+ const range = rangeOf(source, ann.commentStart, ann.commentEnd);
255
+ const methodSym = {
256
+ name: methodName,
257
+ detail,
258
+ kind,
259
+ range,
260
+ selectionRange: range,
261
+ };
262
+ if (!childrenByParent.has(parentName)) {
263
+ childrenByParent.set(parentName, []);
264
+ }
265
+ childrenByParent.get(parentName).push(methodSym);
266
+ }
267
+ // --- Collect static method annotations (Name.method) ---
268
+ for (const [annName, ann] of result.annotations) {
269
+ if (!annName.includes('.') || annName.includes('#'))
270
+ continue;
271
+ const dotIdx = annName.indexOf('.');
272
+ const parentName = annName.slice(0, dotIdx);
273
+ const methodName = annName.slice(dotIdx + 1);
274
+ // Skip if it's not attached to a raw symbol
275
+ if (!rawSymbols.some(s => s.name === parentName))
276
+ continue;
277
+ // Prefer the user's verbatim annotation text over a re-printed scheme.
278
+ const detail = ann.raw ?? (ann.scheme ? formatScheme(ann.scheme, inferredTypeStyle) : undefined);
279
+ const range = rangeOf(source, ann.commentStart, ann.commentEnd);
280
+ const methodSym = {
281
+ name: methodName,
282
+ detail,
283
+ kind: node_1.SymbolKind.Method,
284
+ range,
285
+ selectionRange: range,
286
+ };
287
+ if (!childrenByParent.has(parentName)) {
288
+ childrenByParent.set(parentName, []);
289
+ }
290
+ childrenByParent.get(parentName).push(methodSym);
291
+ }
292
+ // --- Build top-level declaration symbols ---
293
+ for (const raw of rawSymbols) {
294
+ const scheme = result.topLevelBindings.get(raw.name)
295
+ ?? result.exports.get(raw.name);
296
+ const ann = result.annotations.get(raw.name);
297
+ // Extend full range to include preceding annotation comment
298
+ let fullStart = raw.fullStart;
299
+ if (ann && ann.commentStart < fullStart) {
300
+ fullStart = ann.commentStart;
301
+ }
302
+ const kind = raw.name === 'default'
303
+ ? node_1.SymbolKind.Variable
304
+ : classifySymbol(raw.name, scheme);
305
+ // Prefer the user's verbatim annotation text when present, so the
306
+ // outline matches exactly what was written. Fall back to the
307
+ // inferred/parsed scheme otherwise.
308
+ const detail = ann?.raw
309
+ ? ann.raw
310
+ : scheme
311
+ ? formatScheme(scheme, inferredTypeStyle)
312
+ : ann?.scheme
313
+ ? formatScheme(ann.scheme, inferredTypeStyle)
314
+ : undefined;
315
+ const sym = {
316
+ name: raw.name,
317
+ detail,
318
+ kind,
319
+ range: rangeOf(source, fullStart, raw.fullEnd),
320
+ selectionRange: rangeOf(source, raw.selStart, raw.selEnd),
321
+ children: childrenByParent.get(raw.name),
322
+ };
323
+ symbols.push(sym);
324
+ }
325
+ // --- sumtype declarations → Enum + EnumMember children ---
326
+ const dataDecls = (0, commentParser_1.extractDataDirectives)(source);
327
+ for (const decl of dataDecls) {
328
+ // Don't duplicate if the name was already emitted as a regular symbol
329
+ if (symbols.some(s => s.name === decl.name))
330
+ continue;
331
+ const range = rangeOf(source, decl.commentStart, decl.commentEnd);
332
+ const variantChildren = decl.variants.map(v => {
333
+ // Find the variant's constructor annotation for detail
334
+ const variantAnn = result.annotations.get(v.name);
335
+ const variantDetail = variantAnn?.raw
336
+ ? variantAnn.raw
337
+ : variantAnn?.scheme
338
+ ? formatScheme(variantAnn.scheme, inferredTypeStyle)
339
+ : v.fields.length > 0
340
+ ? v.fields.join(' ')
341
+ : undefined;
342
+ return {
343
+ name: v.name,
344
+ detail: variantDetail,
345
+ kind: node_1.SymbolKind.EnumMember,
346
+ range, // variants share the sumtype comment range
347
+ selectionRange: range,
348
+ };
349
+ });
350
+ // Add method annotations as children too
351
+ const methods = childrenByParent.get(decl.name) ?? [];
352
+ const sym = {
353
+ name: decl.name,
354
+ detail: `${decl.typeVars.join(' ')}`,
355
+ kind: node_1.SymbolKind.Enum,
356
+ range,
357
+ selectionRange: range,
358
+ children: [...variantChildren, ...methods],
359
+ };
360
+ symbols.push(sym);
361
+ }
362
+ // --- Type aliases → Interface symbols ---
363
+ for (const [name, alias] of result.typeAliases) {
364
+ // Don't duplicate if already covered by a declaration or sumtype
365
+ if (symbols.some(s => s.name === name))
366
+ continue;
367
+ const range = rangeOf(source, alias.commentStart, alias.commentEnd);
368
+ const detail = inferredTypeStyle === 'pretty'
369
+ ? (0, types_1.prettyTypeToString)(alias.type)
370
+ : (0, types_1.typeToString)(alias.type);
371
+ symbols.push({
372
+ name,
373
+ detail,
374
+ kind: node_1.SymbolKind.Interface,
375
+ range,
376
+ selectionRange: range,
377
+ });
378
+ }
379
+ return symbols;
380
+ }
381
+ //# sourceMappingURL=documentSymbols.js.map