Copy disabled (too large)
Download .txt
Showing preview only (10,163K chars total). Download the full file to get everything.
Repository: rescript-lang/rescript-vscode
Branch: master
Commit: 2bc69d29ed92
Files: 1282
Total size: 9.4 MB
Directory structure:
gitextract_gb5prtmt/
├── .github/
│ └── workflows/
│ ├── bump-version.js
│ └── ci.yml
├── .gitignore
├── .ocamlformat
├── .ocamlformat-ignore
├── .prettierignore
├── .prettierrc
├── .vscode/
│ ├── extensions.json
│ ├── launch.json
│ ├── settings.json
│ └── tasks.json
├── .vscodeignore
├── AGENTS.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE.txt
├── Makefile
├── README.md
├── analysis/
│ ├── Makefile
│ ├── README.md
│ ├── bin/
│ │ ├── dune
│ │ └── main.ml
│ ├── dune
│ ├── examples/
│ │ ├── example-project/
│ │ │ ├── .gitignore
│ │ │ ├── .vscode/
│ │ │ │ └── settings.json
│ │ │ ├── package.json
│ │ │ ├── rescript.json
│ │ │ └── src/
│ │ │ ├── Embeded.md
│ │ │ ├── Hello.res
│ │ │ ├── Hello.res.js
│ │ │ ├── Json.res
│ │ │ ├── Json.res.js
│ │ │ ├── ModuleWithDocComment.res
│ │ │ ├── ModuleWithDocComment.res.js
│ │ │ ├── More.res
│ │ │ ├── More.res.js
│ │ │ ├── More.resi
│ │ │ ├── Other.res
│ │ │ ├── Other.res.js
│ │ │ ├── TransformHelpers.res
│ │ │ ├── TransformHelpers.res.js
│ │ │ ├── ZZ.res
│ │ │ ├── ZZ.res.js
│ │ │ └── syntax/
│ │ │ ├── sample-highlighting.res
│ │ │ ├── sample-highlighting.rs
│ │ │ └── sample-highlighting.tsx
│ │ ├── larger-project/
│ │ │ ├── .gitignore
│ │ │ ├── .merlin
│ │ │ ├── .watchmanconfig
│ │ │ ├── bsconfig.json
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ ├── AutoAnnotate.js
│ │ │ ├── AutoAnnotate.res
│ │ │ ├── BootloaderResource.js
│ │ │ ├── BootloaderResource.res
│ │ │ ├── BucklescriptAnnotations.js
│ │ │ ├── BucklescriptAnnotations.res
│ │ │ ├── ComponentAsProp.js
│ │ │ ├── ComponentAsProp.res
│ │ │ ├── CreateErrorHandler1.js
│ │ │ ├── CreateErrorHandler1.res
│ │ │ ├── CreateErrorHandler2.js
│ │ │ ├── CreateErrorHandler2.res
│ │ │ ├── DeadCodeImplementation.js
│ │ │ ├── DeadCodeImplementation.res
│ │ │ ├── DeadCodeInterface.js
│ │ │ ├── DeadCodeInterface.res
│ │ │ ├── DeadExn.js
│ │ │ ├── DeadExn.res
│ │ │ ├── DeadExn.resi
│ │ │ ├── DeadRT.js
│ │ │ ├── DeadRT.res
│ │ │ ├── DeadRT.resi
│ │ │ ├── DeadTest.js
│ │ │ ├── DeadTest.res
│ │ │ ├── DeadTestBlacklist.js
│ │ │ ├── DeadTestBlacklist.res
│ │ │ ├── DeadTestWithInterface.js
│ │ │ ├── DeadTestWithInterface.res
│ │ │ ├── DeadTestWithInterface.resi
│ │ │ ├── DeadTypeTest.js
│ │ │ ├── DeadTypeTest.res
│ │ │ ├── DeadTypeTest.resi
│ │ │ ├── DeadValueTest.js
│ │ │ ├── DeadValueTest.res
│ │ │ ├── DeadValueTest.resi
│ │ │ ├── Docstrings.js
│ │ │ ├── Docstrings.res
│ │ │ ├── DynamicallyLoadedComponent.js
│ │ │ ├── DynamicallyLoadedComponent.res
│ │ │ ├── EmptyArray.js
│ │ │ ├── EmptyArray.res
│ │ │ ├── ErrorHandler.js
│ │ │ ├── ErrorHandler.res
│ │ │ ├── ErrorHandler.resi
│ │ │ ├── EverythingLiveHere.js
│ │ │ ├── EverythingLiveHere.res
│ │ │ ├── FC.js
│ │ │ ├── FC.res
│ │ │ ├── FirstClassModules.js
│ │ │ ├── FirstClassModules.res
│ │ │ ├── FirstClassModulesInterface.js
│ │ │ ├── FirstClassModulesInterface.res
│ │ │ ├── FirstClassModulesInterface.resi
│ │ │ ├── Hooks.js
│ │ │ ├── Hooks.res
│ │ │ ├── IgnoreInterface.js
│ │ │ ├── IgnoreInterface.res
│ │ │ ├── IgnoreInterface.resi
│ │ │ ├── ImmutableArray.js
│ │ │ ├── ImmutableArray.res
│ │ │ ├── ImmutableArray.resi
│ │ │ ├── ImportHookDefault.js
│ │ │ ├── ImportHookDefault.res
│ │ │ ├── ImportHooks.js
│ │ │ ├── ImportHooks.res
│ │ │ ├── ImportIndex.js
│ │ │ ├── ImportIndex.res
│ │ │ ├── ImportJsValue.js
│ │ │ ├── ImportJsValue.res
│ │ │ ├── ImportMyBanner.js
│ │ │ ├── ImportMyBanner.res
│ │ │ ├── JSResource.js
│ │ │ ├── JSResource.res
│ │ │ ├── LetPrivate.js
│ │ │ ├── LetPrivate.res
│ │ │ ├── ModuleAliases.js
│ │ │ ├── ModuleAliases.res
│ │ │ ├── ModuleAliases2.js
│ │ │ ├── ModuleAliases2.res
│ │ │ ├── ModuleExceptionBug.js
│ │ │ ├── ModuleExceptionBug.res
│ │ │ ├── NestedModules.js
│ │ │ ├── NestedModules.res
│ │ │ ├── NestedModulesInSignature.js
│ │ │ ├── NestedModulesInSignature.res
│ │ │ ├── NestedModulesInSignature.resi
│ │ │ ├── Newsyntax.js
│ │ │ ├── Newsyntax.res
│ │ │ ├── Newton.js
│ │ │ ├── Newton.res
│ │ │ ├── Opaque.js
│ │ │ ├── Opaque.res
│ │ │ ├── OptArg.js
│ │ │ ├── OptArg.res
│ │ │ ├── OptArg.resi
│ │ │ ├── P.js
│ │ │ ├── P.res
│ │ │ ├── Records.js
│ │ │ ├── Records.res
│ │ │ ├── References.js
│ │ │ ├── References.res
│ │ │ ├── RepeatedLabel.js
│ │ │ ├── RepeatedLabel.res
│ │ │ ├── RequireCond.js
│ │ │ ├── RequireCond.res
│ │ │ ├── Shadow.js
│ │ │ ├── Shadow.res
│ │ │ ├── TestDeadExn.js
│ │ │ ├── TestDeadExn.res
│ │ │ ├── TestEmitInnerModules.js
│ │ │ ├── TestEmitInnerModules.res
│ │ │ ├── TestFirstClassModules.js
│ │ │ ├── TestFirstClassModules.res
│ │ │ ├── TestImmutableArray.js
│ │ │ ├── TestImmutableArray.res
│ │ │ ├── TestImport.js
│ │ │ ├── TestImport.res
│ │ │ ├── TestModuleAliases.js
│ │ │ ├── TestModuleAliases.res
│ │ │ ├── TestOptArg.js
│ │ │ ├── TestOptArg.res
│ │ │ ├── TestPromise.js
│ │ │ ├── TestPromise.res
│ │ │ ├── ToSuppress.js
│ │ │ ├── ToSuppress.res
│ │ │ ├── TransitiveType1.js
│ │ │ ├── TransitiveType1.res
│ │ │ ├── TransitiveType2.js
│ │ │ ├── TransitiveType2.res
│ │ │ ├── TransitiveType3.js
│ │ │ ├── TransitiveType3.res
│ │ │ ├── Tuples.js
│ │ │ ├── Tuples.res
│ │ │ ├── TypeParams1.js
│ │ │ ├── TypeParams1.res
│ │ │ ├── TypeParams2.js
│ │ │ ├── TypeParams2.res
│ │ │ ├── TypeParams3.js
│ │ │ ├── TypeParams3.res
│ │ │ ├── Types.js
│ │ │ ├── Types.res
│ │ │ ├── Unboxed.js
│ │ │ ├── Unboxed.res
│ │ │ ├── Uncurried.js
│ │ │ ├── Uncurried.res
│ │ │ ├── Unison.js
│ │ │ ├── Unison.res
│ │ │ ├── UseImportJsValue.js
│ │ │ ├── UseImportJsValue.res
│ │ │ ├── Variants.js
│ │ │ ├── Variants.res
│ │ │ ├── VariantsWithPayload.js
│ │ │ ├── VariantsWithPayload.res
│ │ │ ├── arg_helper.js
│ │ │ ├── arg_helper.res
│ │ │ ├── ast_helper.js
│ │ │ ├── ast_helper.res
│ │ │ ├── asttypes.js
│ │ │ ├── asttypes.res
│ │ │ ├── clflags.js
│ │ │ ├── clflags.res
│ │ │ ├── config.js
│ │ │ ├── config.res
│ │ │ ├── exception/
│ │ │ │ ├── Arr.js
│ │ │ │ ├── Arr.res
│ │ │ │ ├── BeltTest.js
│ │ │ │ ├── BeltTest.res
│ │ │ │ ├── BsJson.js
│ │ │ │ ├── BsJson.res
│ │ │ │ ├── Exn.js
│ │ │ │ ├── Exn.res
│ │ │ │ ├── ExnA.js
│ │ │ │ ├── ExnA.res
│ │ │ │ ├── ExnB.js
│ │ │ │ ├── ExnB.res
│ │ │ │ ├── ExportWithRename.js
│ │ │ │ ├── ExportWithRename.res
│ │ │ │ ├── InnerModules.js
│ │ │ │ ├── InnerModules.res
│ │ │ │ ├── TestInnerModules.js
│ │ │ │ ├── TestInnerModules.res
│ │ │ │ ├── TestYojson.js
│ │ │ │ ├── TestYojson.res
│ │ │ │ ├── Yojson.js
│ │ │ │ └── Yojson.res
│ │ │ ├── format.js
│ │ │ ├── format.res
│ │ │ ├── identifiable.js
│ │ │ ├── location.js
│ │ │ ├── location.res
│ │ │ ├── longident.js
│ │ │ ├── longident.res
│ │ │ ├── loop.js
│ │ │ ├── loop.res
│ │ │ ├── misc.js
│ │ │ ├── misc.res
│ │ │ ├── nativeint.js
│ │ │ ├── nativeint.res
│ │ │ ├── numbers.js
│ │ │ ├── numbers.res
│ │ │ ├── parsetree.js
│ │ │ ├── parsetree.res
│ │ │ ├── printf.js
│ │ │ ├── printf.res
│ │ │ ├── res_comment.js
│ │ │ ├── res_comment.res
│ │ │ ├── res_comments_table.js
│ │ │ ├── res_comments_table.res
│ │ │ ├── res_core.js
│ │ │ ├── res_core.res
│ │ │ ├── res_diagnostics.js
│ │ │ ├── res_diagnostics.res
│ │ │ ├── res_diagnostics_printing_utils.js
│ │ │ ├── res_diagnostics_printing_utils.res
│ │ │ ├── res_doc.js
│ │ │ ├── res_doc.res
│ │ │ ├── res_grammar.js
│ │ │ ├── res_grammar.res
│ │ │ ├── res_js_ffi.js
│ │ │ ├── res_js_ffi.res
│ │ │ ├── res_minibuffer.js
│ │ │ ├── res_minibuffer.res
│ │ │ ├── res_parens.js
│ │ │ ├── res_parens.res
│ │ │ ├── res_parser.js
│ │ │ ├── res_parser.res
│ │ │ ├── res_parsetree_viewer.js
│ │ │ ├── res_parsetree_viewer.res
│ │ │ ├── res_printer.js
│ │ │ ├── res_printer.res
│ │ │ ├── res_reporting.js
│ │ │ ├── res_reporting.res
│ │ │ ├── res_scanner.js
│ │ │ ├── res_scanner.res
│ │ │ ├── res_token.js
│ │ │ ├── res_token.res
│ │ │ ├── res_utf8.js
│ │ │ ├── res_utf8.res
│ │ │ ├── syntaxerr.js
│ │ │ ├── syntaxerr.res
│ │ │ ├── warnings.js
│ │ │ └── warnings.res
│ │ ├── monorepo-project/
│ │ │ ├── .gitignore
│ │ │ ├── .vscode/
│ │ │ │ └── settings.json
│ │ │ ├── package.json
│ │ │ ├── packages/
│ │ │ │ └── app/
│ │ │ │ ├── .vscode/
│ │ │ │ │ └── settings.json
│ │ │ │ ├── package.json
│ │ │ │ ├── rescript.json
│ │ │ │ └── src/
│ │ │ │ ├── App.mjs
│ │ │ │ └── App.res
│ │ │ ├── rescript.json
│ │ │ └── src/
│ │ │ ├── Root.mjs
│ │ │ └── Root.res
│ │ ├── rescript9-project/
│ │ │ ├── .gitignore
│ │ │ ├── .vscode/
│ │ │ │ └── settings.json
│ │ │ ├── bsconfig.json
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ ├── Hello.bs.js
│ │ │ └── Hello.res
│ │ └── workspace-project/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── app/
│ │ │ ├── bsconfig.json
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── App.res
│ │ ├── bsconfig.json
│ │ ├── common/
│ │ │ ├── bsconfig.json
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ ├── Utils.mjs
│ │ │ └── Utils.res
│ │ ├── myplugin/
│ │ │ ├── bsconfig.json
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ ├── Promise.mjs
│ │ │ └── Promise.res
│ │ └── package.json
│ ├── reanalyze/
│ │ ├── Makefile
│ │ ├── dune
│ │ ├── examples/
│ │ │ ├── .gitignore
│ │ │ ├── deadcode/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .watchmanconfig
│ │ │ │ ├── Makefile
│ │ │ │ ├── bsconfig.json
│ │ │ │ ├── expected/
│ │ │ │ │ ├── deadcode.txt
│ │ │ │ │ └── exception.txt
│ │ │ │ ├── package.json
│ │ │ │ ├── src/
│ │ │ │ │ ├── AutoAnnotate.bs.js
│ │ │ │ │ ├── AutoAnnotate.res
│ │ │ │ │ ├── BootloaderResource.bs.js
│ │ │ │ │ ├── BootloaderResource.res
│ │ │ │ │ ├── BucklescriptAnnotations.bs.js
│ │ │ │ │ ├── BucklescriptAnnotations.res
│ │ │ │ │ ├── ComponentAsProp.bs.js
│ │ │ │ │ ├── ComponentAsProp.res
│ │ │ │ │ ├── CreateErrorHandler1.bs.js
│ │ │ │ │ ├── CreateErrorHandler1.res
│ │ │ │ │ ├── CreateErrorHandler2.bs.js
│ │ │ │ │ ├── CreateErrorHandler2.res
│ │ │ │ │ ├── DeadCodeImplementation.bs.js
│ │ │ │ │ ├── DeadCodeImplementation.res
│ │ │ │ │ ├── DeadCodeInterface.bs.js
│ │ │ │ │ ├── DeadCodeInterface.res
│ │ │ │ │ ├── DeadExn.bs.js
│ │ │ │ │ ├── DeadExn.res
│ │ │ │ │ ├── DeadExn.resi
│ │ │ │ │ ├── DeadRT.bs.js
│ │ │ │ │ ├── DeadRT.res
│ │ │ │ │ ├── DeadRT.resi
│ │ │ │ │ ├── DeadTest.bs.js
│ │ │ │ │ ├── DeadTest.res
│ │ │ │ │ ├── DeadTestBlacklist.bs.js
│ │ │ │ │ ├── DeadTestBlacklist.res
│ │ │ │ │ ├── DeadTestWithInterface.bs.js
│ │ │ │ │ ├── DeadTestWithInterface.res
│ │ │ │ │ ├── DeadTestWithInterface.resi
│ │ │ │ │ ├── DeadTypeTest.bs.js
│ │ │ │ │ ├── DeadTypeTest.res
│ │ │ │ │ ├── DeadTypeTest.resi
│ │ │ │ │ ├── DeadValueTest.bs.js
│ │ │ │ │ ├── DeadValueTest.res
│ │ │ │ │ ├── DeadValueTest.resi
│ │ │ │ │ ├── Docstrings.bs.js
│ │ │ │ │ ├── Docstrings.res
│ │ │ │ │ ├── DynamicallyLoadedComponent.bs.js
│ │ │ │ │ ├── DynamicallyLoadedComponent.res
│ │ │ │ │ ├── EmptyArray.bs.js
│ │ │ │ │ ├── EmptyArray.res
│ │ │ │ │ ├── ErrorHandler.bs.js
│ │ │ │ │ ├── ErrorHandler.res
│ │ │ │ │ ├── ErrorHandler.resi
│ │ │ │ │ ├── EverythingLiveHere.bs.js
│ │ │ │ │ ├── EverythingLiveHere.res
│ │ │ │ │ ├── FC.bs.js
│ │ │ │ │ ├── FC.res
│ │ │ │ │ ├── FirstClassModules.bs.js
│ │ │ │ │ ├── FirstClassModules.res
│ │ │ │ │ ├── FirstClassModulesInterface.bs.js
│ │ │ │ │ ├── FirstClassModulesInterface.res
│ │ │ │ │ ├── FirstClassModulesInterface.resi
│ │ │ │ │ ├── Hooks.bs.js
│ │ │ │ │ ├── Hooks.res
│ │ │ │ │ ├── IgnoreInterface.bs.js
│ │ │ │ │ ├── IgnoreInterface.res
│ │ │ │ │ ├── IgnoreInterface.resi
│ │ │ │ │ ├── ImmutableArray.bs.js
│ │ │ │ │ ├── ImmutableArray.res
│ │ │ │ │ ├── ImmutableArray.resi
│ │ │ │ │ ├── ImportHookDefault.bs.js
│ │ │ │ │ ├── ImportHookDefault.res
│ │ │ │ │ ├── ImportHooks.bs.js
│ │ │ │ │ ├── ImportHooks.res
│ │ │ │ │ ├── ImportIndex.bs.js
│ │ │ │ │ ├── ImportIndex.res
│ │ │ │ │ ├── ImportJsValue.bs.js
│ │ │ │ │ ├── ImportJsValue.res
│ │ │ │ │ ├── ImportMyBanner.bs.js
│ │ │ │ │ ├── ImportMyBanner.res
│ │ │ │ │ ├── InnerModuleTypes.bs.js
│ │ │ │ │ ├── InnerModuleTypes.res
│ │ │ │ │ ├── InnerModuleTypes.resi
│ │ │ │ │ ├── JSResource.bs.js
│ │ │ │ │ ├── JSResource.res
│ │ │ │ │ ├── JsxV4.bs.js
│ │ │ │ │ ├── JsxV4.res
│ │ │ │ │ ├── LetPrivate.bs.js
│ │ │ │ │ ├── LetPrivate.res
│ │ │ │ │ ├── ModuleAliases.bs.js
│ │ │ │ │ ├── ModuleAliases.res
│ │ │ │ │ ├── ModuleAliases2.bs.js
│ │ │ │ │ ├── ModuleAliases2.res
│ │ │ │ │ ├── ModuleExceptionBug.bs.js
│ │ │ │ │ ├── ModuleExceptionBug.res
│ │ │ │ │ ├── NestedModules.bs.js
│ │ │ │ │ ├── NestedModules.res
│ │ │ │ │ ├── NestedModulesInSignature.bs.js
│ │ │ │ │ ├── NestedModulesInSignature.res
│ │ │ │ │ ├── NestedModulesInSignature.resi
│ │ │ │ │ ├── Newsyntax.bs.js
│ │ │ │ │ ├── Newsyntax.res
│ │ │ │ │ ├── Newton.bs.js
│ │ │ │ │ ├── Newton.res
│ │ │ │ │ ├── Opaque.bs.js
│ │ │ │ │ ├── Opaque.res
│ │ │ │ │ ├── OptArg.bs.js
│ │ │ │ │ ├── OptArg.res
│ │ │ │ │ ├── OptArg.resi
│ │ │ │ │ ├── Records.bs.js
│ │ │ │ │ ├── Records.res
│ │ │ │ │ ├── References.bs.js
│ │ │ │ │ ├── References.res
│ │ │ │ │ ├── RepeatedLabel.bs.js
│ │ │ │ │ ├── RepeatedLabel.res
│ │ │ │ │ ├── RequireCond.bs.js
│ │ │ │ │ ├── RequireCond.res
│ │ │ │ │ ├── Shadow.bs.js
│ │ │ │ │ ├── Shadow.res
│ │ │ │ │ ├── TestDeadExn.bs.js
│ │ │ │ │ ├── TestDeadExn.res
│ │ │ │ │ ├── TestEmitInnerModules.bs.js
│ │ │ │ │ ├── TestEmitInnerModules.res
│ │ │ │ │ ├── TestFirstClassModules.bs.js
│ │ │ │ │ ├── TestFirstClassModules.res
│ │ │ │ │ ├── TestImmutableArray.bs.js
│ │ │ │ │ ├── TestImmutableArray.res
│ │ │ │ │ ├── TestImport.bs.js
│ │ │ │ │ ├── TestImport.res
│ │ │ │ │ ├── TestInnedModuleTypes.bs.js
│ │ │ │ │ ├── TestInnedModuleTypes.res
│ │ │ │ │ ├── TestModuleAliases.bs.js
│ │ │ │ │ ├── TestModuleAliases.res
│ │ │ │ │ ├── TestOptArg.bs.js
│ │ │ │ │ ├── TestOptArg.res
│ │ │ │ │ ├── TestPromise.bs.js
│ │ │ │ │ ├── TestPromise.res
│ │ │ │ │ ├── ToSuppress.bs.js
│ │ │ │ │ ├── ToSuppress.res
│ │ │ │ │ ├── TransitiveType1.bs.js
│ │ │ │ │ ├── TransitiveType1.res
│ │ │ │ │ ├── TransitiveType2.bs.js
│ │ │ │ │ ├── TransitiveType2.res
│ │ │ │ │ ├── TransitiveType3.bs.js
│ │ │ │ │ ├── TransitiveType3.res
│ │ │ │ │ ├── Tuples.bs.js
│ │ │ │ │ ├── Tuples.res
│ │ │ │ │ ├── TypeParams1.bs.js
│ │ │ │ │ ├── TypeParams1.res
│ │ │ │ │ ├── TypeParams2.bs.js
│ │ │ │ │ ├── TypeParams2.res
│ │ │ │ │ ├── TypeParams3.bs.js
│ │ │ │ │ ├── TypeParams3.res
│ │ │ │ │ ├── Types.bs.js
│ │ │ │ │ ├── Types.res
│ │ │ │ │ ├── Unboxed.bs.js
│ │ │ │ │ ├── Unboxed.res
│ │ │ │ │ ├── Uncurried.bs.js
│ │ │ │ │ ├── Uncurried.res
│ │ │ │ │ ├── Unison.bs.js
│ │ │ │ │ ├── Unison.res
│ │ │ │ │ ├── UseImportJsValue.bs.js
│ │ │ │ │ ├── UseImportJsValue.res
│ │ │ │ │ ├── Variants.bs.js
│ │ │ │ │ ├── Variants.res
│ │ │ │ │ ├── VariantsWithPayload.bs.js
│ │ │ │ │ ├── VariantsWithPayload.res
│ │ │ │ │ ├── exception/
│ │ │ │ │ │ ├── Arr.bs.js
│ │ │ │ │ │ ├── Arr.res
│ │ │ │ │ │ ├── BeltTest.bs.js
│ │ │ │ │ │ ├── BeltTest.res
│ │ │ │ │ │ ├── BsJson.bs.js
│ │ │ │ │ │ ├── BsJson.res
│ │ │ │ │ │ ├── Exn.bs.js
│ │ │ │ │ │ ├── Exn.res
│ │ │ │ │ │ ├── ExnA.bs.js
│ │ │ │ │ │ ├── ExnA.res
│ │ │ │ │ │ ├── ExnB.bs.js
│ │ │ │ │ │ ├── ExnB.res
│ │ │ │ │ │ ├── ExportWithRename.bs.js
│ │ │ │ │ │ ├── ExportWithRename.res
│ │ │ │ │ │ ├── InnerModules.bs.js
│ │ │ │ │ │ ├── InnerModules.res
│ │ │ │ │ │ ├── TestInnerModules.bs.js
│ │ │ │ │ │ ├── TestInnerModules.res
│ │ │ │ │ │ ├── TestYojson.bs.js
│ │ │ │ │ │ ├── TestYojson.res
│ │ │ │ │ │ ├── Yojson.bs.js
│ │ │ │ │ │ └── Yojson.res
│ │ │ │ │ ├── exportNestedValues.js
│ │ │ │ │ └── trace.bs.js
│ │ │ │ └── test.sh
│ │ │ └── termination/
│ │ │ ├── .gitignore
│ │ │ ├── .watchmanconfig
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── bsconfig.json
│ │ │ ├── expected/
│ │ │ │ └── termination.txt
│ │ │ ├── package.json
│ │ │ ├── src/
│ │ │ │ ├── TestCyberTruck.bs.js
│ │ │ │ └── TestCyberTruck.res
│ │ │ └── test.sh
│ │ └── src/
│ │ ├── Annotation.ml
│ │ ├── Arnold.ml
│ │ ├── Common.ml
│ │ ├── DeadCode.ml
│ │ ├── DeadCommon.ml
│ │ ├── DeadException.ml
│ │ ├── DeadModules.ml
│ │ ├── DeadOptionalArgs.ml
│ │ ├── DeadType.ml
│ │ ├── DeadValue.ml
│ │ ├── EmitJson.ml
│ │ ├── Exception.ml
│ │ ├── Exceptions.ml
│ │ ├── Exn.ml
│ │ ├── Exn.mli
│ │ ├── ExnLib.ml
│ │ ├── FindSourceFile.ml
│ │ ├── Issues.ml
│ │ ├── Log_.ml
│ │ ├── ModulePath.ml
│ │ ├── Name.ml
│ │ ├── Name.mli
│ │ ├── Paths.ml
│ │ ├── Reanalyze.ml
│ │ ├── RunConfig.ml
│ │ ├── SideEffects.ml
│ │ ├── Suppress.ml
│ │ ├── Version.ml
│ │ ├── WriteDeadAnnotations.ml
│ │ └── dune
│ ├── src/
│ │ ├── BuildSystem.ml
│ │ ├── Cache.ml
│ │ ├── Cfg.ml
│ │ ├── Cmt.ml
│ │ ├── CodeActions.ml
│ │ ├── Codemod.ml
│ │ ├── Commands.ml
│ │ ├── CompletionBackEnd.ml
│ │ ├── CompletionDecorators.ml
│ │ ├── CompletionExpressions.ml
│ │ ├── CompletionFrontEnd.ml
│ │ ├── CompletionJsx.ml
│ │ ├── CompletionPatterns.ml
│ │ ├── Completions.ml
│ │ ├── CreateInterface.ml
│ │ ├── DceCommand.ml
│ │ ├── Debug.ml
│ │ ├── Diagnostics.ml
│ │ ├── DocumentSymbol.ml
│ │ ├── DotCompletionUtils.ml
│ │ ├── DumpAst.ml
│ │ ├── Files.ml
│ │ ├── FindFiles.ml
│ │ ├── Hint.ml
│ │ ├── Hover.ml
│ │ ├── JsxHacks.ml
│ │ ├── Loc.ml
│ │ ├── LocalTables.ml
│ │ ├── Log.ml
│ │ ├── Markdown.ml
│ │ ├── ModuleResolution.ml
│ │ ├── Packages.ml
│ │ ├── PipeCompletionUtils.ml
│ │ ├── Pos.ml
│ │ ├── PrintType.ml
│ │ ├── ProcessAttributes.ml
│ │ ├── ProcessCmt.ml
│ │ ├── ProcessExtra.ml
│ │ ├── Protocol.ml
│ │ ├── Range.ml
│ │ ├── References.ml
│ │ ├── ResolvePath.ml
│ │ ├── Scope.ml
│ │ ├── SemanticTokens.ml
│ │ ├── Shared.ml
│ │ ├── SharedTypes.ml
│ │ ├── SignatureHelp.ml
│ │ ├── TypeUtils.ml
│ │ ├── Uri.ml
│ │ ├── Uri.mli
│ │ ├── Utils.ml
│ │ ├── Xform.ml
│ │ └── dune
│ ├── tests/
│ │ ├── Makefile
│ │ ├── bsconfig.json
│ │ ├── not_compiled/
│ │ │ ├── Diagnostics.res
│ │ │ ├── DocTemplate.res
│ │ │ ├── DocTemplate.resi
│ │ │ └── expected/
│ │ │ ├── Diagnostics.res.txt
│ │ │ ├── DocTemplate.res.txt
│ │ │ └── DocTemplate.resi.txt
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── Auto.res
│ │ │ ├── BrokenParserCases.res
│ │ │ ├── CodeLens.res
│ │ │ ├── Codemod.res
│ │ │ ├── CompletableComponent.res
│ │ │ ├── CompletePrioritize1.res
│ │ │ ├── CompletePrioritize2.res
│ │ │ ├── Completion.res
│ │ │ ├── CompletionAttributes.res
│ │ │ ├── CompletionDicts.res
│ │ │ ├── CompletionExpressions.res
│ │ │ ├── CompletionFromModule.res
│ │ │ ├── CompletionFromModule2.res
│ │ │ ├── CompletionFunctionArguments.res
│ │ │ ├── CompletionInferValues.res
│ │ │ ├── CompletionJsx.res
│ │ │ ├── CompletionJsxProps.res
│ │ │ ├── CompletionMultipleEditorCompleteFrom.res
│ │ │ ├── CompletionObjects.res
│ │ │ ├── CompletionPattern.res
│ │ │ ├── CompletionPipeChain.res
│ │ │ ├── CompletionPipeProperty.res
│ │ │ ├── CompletionPipeSubmodules.res
│ │ │ ├── CompletionResolve.res
│ │ │ ├── CompletionSupport.res
│ │ │ ├── CompletionSupport2.res
│ │ │ ├── CompletionTypeAnnotation.res
│ │ │ ├── CompletionTypeT.res
│ │ │ ├── Component.res
│ │ │ ├── Component.resi
│ │ │ ├── CreateInterface.res
│ │ │ ├── Cross.res
│ │ │ ├── Dce.res
│ │ │ ├── Debug.res
│ │ │ ├── Definition.res
│ │ │ ├── DefinitionWithInterface.res
│ │ │ ├── DefinitionWithInterface.resi
│ │ │ ├── Destructuring.res
│ │ │ ├── Div.res
│ │ │ ├── DocComments.res
│ │ │ ├── DocumentSymbol.res
│ │ │ ├── DotPipeCompletionSpec.res
│ │ │ ├── EnvCompletion.res
│ │ │ ├── EnvCompletionOtherFile.res
│ │ │ ├── ExhaustiveSwitch.res
│ │ │ ├── Firebase.res
│ │ │ ├── Fragment.res
│ │ │ ├── Highlight.res
│ │ │ ├── Hover.res
│ │ │ ├── InlayHint.res
│ │ │ ├── Jsx2.res
│ │ │ ├── Jsx2.resi
│ │ │ ├── JsxV4.res
│ │ │ ├── LongIdentTest.res
│ │ │ ├── ModuleStuff.res
│ │ │ ├── Objects.res
│ │ │ ├── Patterns.res
│ │ │ ├── PolyRec.res
│ │ │ ├── QueryFile.res
│ │ │ ├── RecModules.res
│ │ │ ├── RecordCompletion.res
│ │ │ ├── RecoveryOnProp.res
│ │ │ ├── References.res
│ │ │ ├── ReferencesWithInterface.res
│ │ │ ├── ReferencesWithInterface.resi
│ │ │ ├── Rename.res
│ │ │ ├── RenameWithInterface.res
│ │ │ ├── RenameWithInterface.resi
│ │ │ ├── Reprod.res
│ │ │ ├── Rxjs.res
│ │ │ ├── RxjsCompletion.res
│ │ │ ├── SchemaAssets.res
│ │ │ ├── ShadowedBelt.res
│ │ │ ├── SignatureHelp.res
│ │ │ ├── Support.res
│ │ │ ├── TableclothMap.res
│ │ │ ├── TableclothMap.resi
│ │ │ ├── TypeArgCtx.res
│ │ │ ├── TypeAtPosCompletion.res
│ │ │ ├── TypeDefinition.res
│ │ │ ├── Xform.res
│ │ │ ├── dce/
│ │ │ │ └── DceTest.res
│ │ │ ├── expected/
│ │ │ │ ├── Auto.res.txt
│ │ │ │ ├── BrokenParserCases.res.txt
│ │ │ │ ├── CodeLens.res.txt
│ │ │ │ ├── Codemod.res.txt
│ │ │ │ ├── CompletableComponent.res.txt
│ │ │ │ ├── CompletePrioritize1.res.txt
│ │ │ │ ├── CompletePrioritize2.res.txt
│ │ │ │ ├── Completion.res.txt
│ │ │ │ ├── CompletionAttributes.res.txt
│ │ │ │ ├── CompletionDicts.res.txt
│ │ │ │ ├── CompletionExpressions.res.txt
│ │ │ │ ├── CompletionFromModule.res.txt
│ │ │ │ ├── CompletionFromModule2.res.txt
│ │ │ │ ├── CompletionFunctionArguments.res.txt
│ │ │ │ ├── CompletionInferValues.res.txt
│ │ │ │ ├── CompletionJsx.res.txt
│ │ │ │ ├── CompletionJsxProps.res.txt
│ │ │ │ ├── CompletionMultipleEditorCompleteFrom.res.txt
│ │ │ │ ├── CompletionObjects.res.txt
│ │ │ │ ├── CompletionPattern.res.txt
│ │ │ │ ├── CompletionPipeChain.res.txt
│ │ │ │ ├── CompletionPipeProperty.res.txt
│ │ │ │ ├── CompletionPipeSubmodules.res.txt
│ │ │ │ ├── CompletionResolve.res.txt
│ │ │ │ ├── CompletionSupport.res.txt
│ │ │ │ ├── CompletionSupport2.res.txt
│ │ │ │ ├── CompletionTypeAnnotation.res.txt
│ │ │ │ ├── CompletionTypeT.res.txt
│ │ │ │ ├── Component.res.txt
│ │ │ │ ├── Component.resi.txt
│ │ │ │ ├── CreateInterface.res.txt
│ │ │ │ ├── Cross.res.txt
│ │ │ │ ├── Dce.res.txt
│ │ │ │ ├── Debug.res.txt
│ │ │ │ ├── Definition.res.txt
│ │ │ │ ├── DefinitionWithInterface.res.txt
│ │ │ │ ├── DefinitionWithInterface.resi.txt
│ │ │ │ ├── Destructuring.res.txt
│ │ │ │ ├── Div.res.txt
│ │ │ │ ├── DocComments.res.txt
│ │ │ │ ├── DocExtraction2.res.txt
│ │ │ │ ├── DocExtraction2.resi.txt
│ │ │ │ ├── DocExtractionRes.res.txt
│ │ │ │ ├── DocumentSymbol.res.txt
│ │ │ │ ├── DotPipeCompletionSpec.res.txt
│ │ │ │ ├── EnvCompletion.res.txt
│ │ │ │ ├── EnvCompletionOtherFile.res.txt
│ │ │ │ ├── ExhaustiveSwitch.res.txt
│ │ │ │ ├── Firebase.res.txt
│ │ │ │ ├── Fragment.res.txt
│ │ │ │ ├── Highlight.res.txt
│ │ │ │ ├── Hover.res.txt
│ │ │ │ ├── InlayHint.res.txt
│ │ │ │ ├── Jsx2.res.txt
│ │ │ │ ├── Jsx2.resi.txt
│ │ │ │ ├── JsxV4.res.txt
│ │ │ │ ├── LongIdentTest.res.txt
│ │ │ │ ├── ModuleStuff.res.txt
│ │ │ │ ├── Objects.res.txt
│ │ │ │ ├── Patterns.res.txt
│ │ │ │ ├── PolyRec.res.txt
│ │ │ │ ├── QueryFile.res.txt
│ │ │ │ ├── RecModules.res.txt
│ │ │ │ ├── RecordCompletion.res.txt
│ │ │ │ ├── RecoveryOnProp.res.txt
│ │ │ │ ├── References.res.txt
│ │ │ │ ├── ReferencesWithInterface.res.txt
│ │ │ │ ├── ReferencesWithInterface.resi.txt
│ │ │ │ ├── Rename.res.txt
│ │ │ │ ├── RenameWithInterface.res.txt
│ │ │ │ ├── RenameWithInterface.resi.txt
│ │ │ │ ├── Reprod.res.txt
│ │ │ │ ├── Rxjs.res.txt
│ │ │ │ ├── RxjsCompletion.res.txt
│ │ │ │ ├── SchemaAssets.res.txt
│ │ │ │ ├── ShadowedBelt.res.txt
│ │ │ │ ├── SignatureHelp.res.txt
│ │ │ │ ├── Support.res.txt
│ │ │ │ ├── TableclothMap.res.txt
│ │ │ │ ├── TableclothMap.resi.txt
│ │ │ │ ├── TypeArgCtx.res.txt
│ │ │ │ ├── TypeAtPosCompletion.res.txt
│ │ │ │ ├── TypeDefinition.res.txt
│ │ │ │ └── Xform.res.txt
│ │ │ ├── inner/
│ │ │ │ ├── ComponentInner.res
│ │ │ │ ├── ComponentInner.resi
│ │ │ │ ├── ReferencesInner.res
│ │ │ │ └── ReferencesInner.resi
│ │ │ ├── test.json
│ │ │ └── tst.js
│ │ └── test.sh
│ ├── tests-generic-jsx-transform/
│ │ ├── Makefile
│ │ ├── package.json
│ │ ├── rescript.json
│ │ ├── src/
│ │ │ ├── GenericJsx.res
│ │ │ ├── GenericJsxCompletion.res
│ │ │ └── expected/
│ │ │ ├── GenericJsx.res.txt
│ │ │ └── GenericJsxCompletion.res.txt
│ │ └── test.sh
│ ├── tests-incremental-typechecking/
│ │ ├── Makefile
│ │ ├── package.json
│ │ ├── rescript.json
│ │ ├── src/
│ │ │ ├── ConstructorCompletion__Json.res
│ │ │ ├── ConstructorCompletion__Own.res
│ │ │ └── expected/
│ │ │ ├── ConstructorCompletion__Json.res.txt
│ │ │ └── ConstructorCompletion__Own.res.txt
│ │ └── test.sh
│ └── vendor/
│ ├── dune
│ ├── ext/
│ │ ├── README.md
│ │ ├── bs_hash_stubs.ml
│ │ ├── bsb_db.ml
│ │ ├── bsb_db.mli
│ │ ├── bsc_args.ml
│ │ ├── bsc_args.mli
│ │ ├── bsc_warnings.ml
│ │ ├── config.ml
│ │ ├── config.mli
│ │ ├── dune
│ │ ├── encoding.md
│ │ ├── ext_array.ml
│ │ ├── ext_array.mli
│ │ ├── ext_basic_hash_stubs.c
│ │ ├── ext_buffer.ml
│ │ ├── ext_buffer.mli
│ │ ├── ext_bytes.ml
│ │ ├── ext_bytes.mli
│ │ ├── ext_char.ml
│ │ ├── ext_char.mli
│ │ ├── ext_cmp.ml
│ │ ├── ext_cmp.mli
│ │ ├── ext_color.ml
│ │ ├── ext_color.mli
│ │ ├── ext_digest.ml
│ │ ├── ext_digest.mli
│ │ ├── ext_file_extensions.ml
│ │ ├── ext_filename.ml
│ │ ├── ext_filename.mli
│ │ ├── ext_fmt.ml
│ │ ├── ext_format.ml
│ │ ├── ext_format.mli
│ │ ├── ext_ident.ml
│ │ ├── ext_ident.mli
│ │ ├── ext_int.ml
│ │ ├── ext_int.mli
│ │ ├── ext_io.ml
│ │ ├── ext_io.mli
│ │ ├── ext_js_file_kind.ml
│ │ ├── ext_js_regex.ml
│ │ ├── ext_js_regex.mli
│ │ ├── ext_json.ml
│ │ ├── ext_json.mli
│ │ ├── ext_json_noloc.ml
│ │ ├── ext_json_noloc.mli
│ │ ├── ext_json_parse.mli
│ │ ├── ext_json_parse.mll
│ │ ├── ext_json_types.ml
│ │ ├── ext_list.ml
│ │ ├── ext_list.mli
│ │ ├── ext_marshal.ml
│ │ ├── ext_marshal.mli
│ │ ├── ext_module_system.ml
│ │ ├── ext_modulename.ml
│ │ ├── ext_modulename.mli
│ │ ├── ext_namespace.ml
│ │ ├── ext_namespace.mli
│ │ ├── ext_namespace_encode.ml
│ │ ├── ext_namespace_encode.mli
│ │ ├── ext_obj.ml
│ │ ├── ext_obj.mli
│ │ ├── ext_option.ml
│ │ ├── ext_option.mli
│ │ ├── ext_path.ml
│ │ ├── ext_path.mli
│ │ ├── ext_pervasives.ml
│ │ ├── ext_pervasives.mli
│ │ ├── ext_position.ml
│ │ ├── ext_position.mli
│ │ ├── ext_pp.ml
│ │ ├── ext_pp.mli
│ │ ├── ext_pp_scope.ml
│ │ ├── ext_pp_scope.mli
│ │ ├── ext_ref.ml
│ │ ├── ext_ref.mli
│ │ ├── ext_scc.ml
│ │ ├── ext_scc.mli
│ │ ├── ext_spec.ml
│ │ ├── ext_spec.mli
│ │ ├── ext_string.ml
│ │ ├── ext_string.mli
│ │ ├── ext_string_array.ml
│ │ ├── ext_string_array.mli
│ │ ├── ext_sys.ml
│ │ ├── ext_sys.mli
│ │ ├── ext_topsort.ml
│ │ ├── ext_topsort.mli
│ │ ├── ext_utf8.ml
│ │ ├── ext_utf8.mli
│ │ ├── ext_util.ml
│ │ ├── ext_util.mli
│ │ ├── hash.cppo.ml
│ │ ├── hash.mli
│ │ ├── hash_gen.ml
│ │ ├── hash_ident.mli
│ │ ├── hash_int.mli
│ │ ├── hash_set.cppo.ml
│ │ ├── hash_set.mli
│ │ ├── hash_set_gen.ml
│ │ ├── hash_set_ident.mli
│ │ ├── hash_set_ident_mask.ml
│ │ ├── hash_set_ident_mask.mli
│ │ ├── hash_set_int.mli
│ │ ├── hash_set_poly.mli
│ │ ├── hash_set_string.mli
│ │ ├── hash_string.mli
│ │ ├── ident.ml
│ │ ├── ident.mli
│ │ ├── identifiable.ml
│ │ ├── identifiable.mli
│ │ ├── int_vec_util.ml
│ │ ├── int_vec_util.mli
│ │ ├── int_vec_vec.ml
│ │ ├── int_vec_vec.mli
│ │ ├── js_reserved_map.ml
│ │ ├── js_reserved_map.mli
│ │ ├── js_runtime_modules.ml
│ │ ├── literals.ml
│ │ ├── map.cppo.ml
│ │ ├── map_gen.ml
│ │ ├── map_gen.mli
│ │ ├── map_ident.mli
│ │ ├── map_int.mli
│ │ ├── map_string.mli
│ │ ├── misc.ml
│ │ ├── misc.mli
│ │ ├── ordered_hash_map.cppo.ml
│ │ ├── ordered_hash_map_gen.ml
│ │ ├── ordered_hash_map_local_ident.mli
│ │ ├── set.cppo.ml
│ │ ├── set_gen.ml
│ │ ├── set_gen.mli
│ │ ├── set_ident.mli
│ │ ├── set_int.mli
│ │ ├── set_string.mli
│ │ ├── union_find.ml
│ │ ├── union_find.mli
│ │ ├── vec.cppo.ml
│ │ ├── vec.mli
│ │ ├── vec_gen.ml
│ │ ├── vec_int.mli
│ │ ├── warnings.ml
│ │ └── warnings.mli
│ ├── js_parser/
│ │ ├── comment_attachment.ml
│ │ ├── declaration_parser.ml
│ │ ├── dune
│ │ ├── enum_common.ml
│ │ ├── enum_parser.ml
│ │ ├── expression_parser.ml
│ │ ├── file_key.ml
│ │ ├── flow_LICENSE
│ │ ├── flow_ast.ml
│ │ ├── flow_ast_mapper.ml
│ │ ├── flow_ast_utils.ml
│ │ ├── flow_ast_utils.mli
│ │ ├── flow_lexer.ml
│ │ ├── flow_lexer.mli
│ │ ├── flow_sedlexing.ml
│ │ ├── flow_sedlexing.mli
│ │ ├── js_id.ml
│ │ ├── js_id.mli
│ │ ├── js_id_unicode.ml
│ │ ├── jsx_parser.ml
│ │ ├── lex_env.ml
│ │ ├── lex_result.ml
│ │ ├── loc.ml
│ │ ├── loc.mli
│ │ ├── object_parser.ml
│ │ ├── parse_error.ml
│ │ ├── parser_common.ml
│ │ ├── parser_env.ml
│ │ ├── parser_env.mli
│ │ ├── parser_flow.ml
│ │ ├── pattern_cover.ml
│ │ ├── pattern_parser.ml
│ │ ├── primitive_deriving.ml
│ │ ├── sedlex_LICENSE
│ │ ├── statement_parser.ml
│ │ ├── token.ml
│ │ ├── type_parser.ml
│ │ ├── wtf8.ml
│ │ └── wtf8.mli
│ ├── json/
│ │ ├── Json.ml
│ │ └── dune
│ ├── ml/
│ │ ├── annot.ml
│ │ ├── ast_async.ml
│ │ ├── ast_await.ml
│ │ ├── ast_helper.ml
│ │ ├── ast_helper.mli
│ │ ├── ast_invariants.ml
│ │ ├── ast_invariants.mli
│ │ ├── ast_iterator.ml
│ │ ├── ast_iterator.mli
│ │ ├── ast_mapper.ml
│ │ ├── ast_mapper.mli
│ │ ├── ast_payload.ml
│ │ ├── ast_payload.mli
│ │ ├── ast_uncurried.ml
│ │ ├── ast_uncurried_utils.ml
│ │ ├── ast_untagged_variants.ml
│ │ ├── asttypes.ml
│ │ ├── bigint_utils.ml
│ │ ├── bigint_utils.mli
│ │ ├── bs_flow_ast_utils.ml
│ │ ├── bs_flow_ast_utils.mli
│ │ ├── btype.ml
│ │ ├── btype.mli
│ │ ├── builtin_attributes.ml
│ │ ├── builtin_attributes.mli
│ │ ├── ccomp.ml
│ │ ├── ccomp.mli
│ │ ├── classify_function.ml
│ │ ├── classify_function.mli
│ │ ├── clflags.ml
│ │ ├── clflags.mli
│ │ ├── cmi_format.ml
│ │ ├── cmi_format.mli
│ │ ├── cmt_format.ml
│ │ ├── cmt_format.mli
│ │ ├── code_frame.ml
│ │ ├── consistbl.ml
│ │ ├── consistbl.mli
│ │ ├── ctype.ml
│ │ ├── ctype.mli
│ │ ├── datarepr.ml
│ │ ├── datarepr.mli
│ │ ├── delayed_checks.ml
│ │ ├── delayed_checks.mli
│ │ ├── depend.ml
│ │ ├── depend.mli
│ │ ├── docstrings.ml
│ │ ├── docstrings.mli
│ │ ├── dune
│ │ ├── env.ml
│ │ ├── env.mli
│ │ ├── envaux.ml
│ │ ├── envaux.mli
│ │ ├── error_message_utils.ml
│ │ ├── includeclass.ml
│ │ ├── includeclass.mli
│ │ ├── includecore.ml
│ │ ├── includecore.mli
│ │ ├── includemod.ml
│ │ ├── includemod.mli
│ │ ├── js_raw_info.ml
│ │ ├── lambda.ml
│ │ ├── lambda.mli
│ │ ├── lexer.mli
│ │ ├── lexer.mll
│ │ ├── location.ml
│ │ ├── location.mli
│ │ ├── longident.ml
│ │ ├── longident.mli
│ │ ├── matching.ml
│ │ ├── matching.mli
│ │ ├── mtype.ml
│ │ ├── mtype.mli
│ │ ├── oprint.ml
│ │ ├── oprint.mli
│ │ ├── outcometree.ml
│ │ ├── parmatch.ml
│ │ ├── parmatch.mli
│ │ ├── parse.ml
│ │ ├── parse.mli
│ │ ├── parser.ml
│ │ ├── parser.mli
│ │ ├── parser.mly
│ │ ├── parsetree.ml
│ │ ├── path.ml
│ │ ├── path.mli
│ │ ├── pprintast.ml
│ │ ├── pprintast.mli
│ │ ├── predef.ml
│ │ ├── predef.mli
│ │ ├── primitive.ml
│ │ ├── primitive.mli
│ │ ├── printast.ml
│ │ ├── printast.mli
│ │ ├── printlambda.ml
│ │ ├── printlambda.mli
│ │ ├── printtyp.ml
│ │ ├── printtyp.mli
│ │ ├── printtyped.ml
│ │ ├── printtyped.mli
│ │ ├── rec_check.ml
│ │ ├── rec_check.mli
│ │ ├── record_coercion.ml
│ │ ├── record_type_spread.ml
│ │ ├── rescript_cpp.ml
│ │ ├── rescript_cpp.mli
│ │ ├── stypes.ml
│ │ ├── stypes.mli
│ │ ├── subst.ml
│ │ ├── subst.mli
│ │ ├── switch.ml
│ │ ├── switch.mli
│ │ ├── syntaxerr.ml
│ │ ├── syntaxerr.mli
│ │ ├── tast_iterator.ml
│ │ ├── tast_iterator.mli
│ │ ├── tast_mapper.ml
│ │ ├── tast_mapper.mli
│ │ ├── tbl.ml
│ │ ├── tbl.mli
│ │ ├── terminfo.ml
│ │ ├── terminfo.mli
│ │ ├── transl_recmodule.ml
│ │ ├── transl_recmodule.mli
│ │ ├── translattribute.ml
│ │ ├── translattribute.mli
│ │ ├── translcore.ml
│ │ ├── translcore.mli
│ │ ├── translmod.ml
│ │ ├── translmod.mli
│ │ ├── typeclass.ml
│ │ ├── typeclass.mli
│ │ ├── typecore.ml
│ │ ├── typecore.mli
│ │ ├── typedecl.ml
│ │ ├── typedecl.mli
│ │ ├── typedtree.ml
│ │ ├── typedtree.mli
│ │ ├── typedtreeIter.ml
│ │ ├── typedtreeIter.mli
│ │ ├── typedtreeMap.ml
│ │ ├── typedtreeMap.mli
│ │ ├── typemod.ml
│ │ ├── typemod.mli
│ │ ├── typeopt.ml
│ │ ├── typeopt.mli
│ │ ├── types.ml
│ │ ├── types.mli
│ │ ├── typetexp.ml
│ │ ├── typetexp.mli
│ │ ├── untypeast.ml
│ │ ├── untypeast.mli
│ │ ├── variant_coercion.ml
│ │ └── variant_type_spread.ml
│ └── res_syntax/
│ ├── dune
│ ├── jsx_common.ml
│ ├── jsx_ppx.ml
│ ├── jsx_ppx.mli
│ ├── jsx_v4.ml
│ ├── reactjs_jsx_v3.ml
│ ├── res_ast_conversion.ml
│ ├── res_ast_conversion.mli
│ ├── res_ast_debugger.ml
│ ├── res_ast_debugger.mli
│ ├── res_cli.ml
│ ├── res_comment.ml
│ ├── res_comment.mli
│ ├── res_comments_table.ml
│ ├── res_core.ml
│ ├── res_core.mli
│ ├── res_diagnostics.ml
│ ├── res_diagnostics.mli
│ ├── res_doc.ml
│ ├── res_doc.mli
│ ├── res_driver.ml
│ ├── res_driver.mli
│ ├── res_driver_binary.ml
│ ├── res_driver_binary.mli
│ ├── res_driver_ml_parser.ml
│ ├── res_driver_ml_parser.mli
│ ├── res_grammar.ml
│ ├── res_io.ml
│ ├── res_io.mli
│ ├── res_minibuffer.ml
│ ├── res_minibuffer.mli
│ ├── res_multi_printer.ml
│ ├── res_multi_printer.mli
│ ├── res_outcome_printer.ml
│ ├── res_outcome_printer.mli
│ ├── res_parens.ml
│ ├── res_parens.mli
│ ├── res_parser.ml
│ ├── res_parser.mli
│ ├── res_parsetree_viewer.ml
│ ├── res_parsetree_viewer.mli
│ ├── res_printer.ml
│ ├── res_printer.mli
│ ├── res_reporting.ml
│ ├── res_scanner.ml
│ ├── res_scanner.mli
│ ├── res_string.ml
│ ├── res_token.ml
│ ├── res_uncurried.ml
│ ├── res_utf8.ml
│ └── res_utf8.mli
├── analysis.opam
├── client/
│ ├── .vscode-test.mjs
│ ├── package.json
│ ├── src/
│ │ ├── commands/
│ │ │ ├── code_analysis.ts
│ │ │ ├── create_interface.ts
│ │ │ ├── dump_debug.ts
│ │ │ ├── open_compiled.ts
│ │ │ ├── paste_as_rescript_json.ts
│ │ │ ├── paste_as_rescript_jsx.ts
│ │ │ ├── switch_impl_intf.ts
│ │ │ └── transform-jsx.ts
│ │ ├── commands.ts
│ │ ├── extension.ts
│ │ ├── test/
│ │ │ └── suite/
│ │ │ ├── exampleProject.test.ts
│ │ │ ├── helpers.ts
│ │ │ ├── monorepoRoot.test.ts
│ │ │ ├── monorepoSubpackage.test.ts
│ │ │ └── rescript9.test.ts
│ │ └── utils.ts
│ └── tsconfig.json
├── dune-project
├── grammars/
│ ├── rescript.markdown.json
│ └── rescript.tmLanguage.json
├── package.json
├── rescript.configuration.json
├── scripts/
│ ├── find-runtime.ts
│ ├── updateVersion.js
│ └── verify-package.mjs
├── server/
│ ├── README.md
│ ├── analysis_binaries/
│ │ └── README.md
│ ├── config.md
│ ├── package.json
│ ├── src/
│ │ ├── bsc-args/
│ │ │ ├── bsb.ts
│ │ │ └── rewatch.ts
│ │ ├── buildSchema.ts
│ │ ├── cli.ts
│ │ ├── codeActions.ts
│ │ ├── config.ts
│ │ ├── constants.ts
│ │ ├── errorReporter.ts
│ │ ├── find-runtime.ts
│ │ ├── incrementalCompilation.ts
│ │ ├── logger.ts
│ │ ├── lookup.ts
│ │ ├── projectFiles.ts
│ │ ├── server.ts
│ │ └── utils.ts
│ └── tsconfig.json
├── shared/
│ ├── src/
│ │ ├── findBinary.ts
│ │ └── projectRoots.ts
│ └── tsconfig.json
├── snippets.json
├── tools/
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── bin/
│ │ ├── dune
│ │ ├── main.ml
│ │ └── version.ml
│ ├── binaries/
│ │ └── .gitkeep
│ ├── npm/
│ │ ├── RescriptTools.res
│ │ ├── Tools_Docgen.res
│ │ ├── Tools_Docgen.resi
│ │ ├── cli.js
│ │ └── getBinaryPath.js
│ ├── package.json
│ ├── rescript.json
│ ├── src/
│ │ ├── dune
│ │ └── tools.ml
│ └── tests/
│ ├── Makefile
│ ├── package.json
│ ├── rescript.json
│ ├── src/
│ │ ├── DocExtraction2.res
│ │ ├── DocExtraction2.resi
│ │ ├── DocExtractionRes.res
│ │ ├── ModC.res
│ │ ├── ModC.resi
│ │ └── expected/
│ │ ├── DocExtraction2.res.json
│ │ ├── DocExtraction2.resi.json
│ │ ├── DocExtractionRes.res.json
│ │ ├── ModC.res.json
│ │ └── ModC.resi.json
│ └── test.sh
├── tools.opam
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/bump-version.js
================================================
const fs = require("fs");
const os = require("os");
const path = require("path");
const semver = require("semver");
const latestPublish = process.argv[2];
const packageJson = fs.readFileSync(path.join("./", "package.json"), {
encoding: "utf-8",
});
let release = JSON.parse(packageJson).version;
let newVersion = latestPublish;
// If the main release gets a major bump but did not get published yet, the package.json version
// will be higher than the one retrieved from the marketplace, so we need to increment from the main release
// E.g. package.json gets bumped from 1.6.0 -> 2.0.0
if (semver.major(release) - semver.major(latestPublish) === 1) {
newVersion = semver.inc(release, "minor", semver.rel);
}
// A prepublished version must be one minor higher than a regular published version.
// E.g. if package.json has version 1.3.0 and there is no prepublished version yet,
// increment minor by one -> 1.4.0.
else if (semver.minor(latestPublish) === semver.minor(release)) {
newVersion = semver.inc(newVersion, "minor", semver.rel);
}
// Increment the version patch. E.g. if we fetch version 1.4.0 as the latest pre-release,
// increment patch by one -> 1.4.1.
else if (semver.minor(latestPublish) > semver.minor(release)) {
newVersion = semver.inc(newVersion, "patch", semver.rel);
}
// If the main release gets a minor bump but did not get published yet, the package.json version
// will be higher than the one retrieved from the marketplace, so we need to increment from the main release
// E.g. package.json gets bumped to 1.5.0 -> 1.6.0
else if (semver.minor(release) - semver.minor(latestPublish) === 1) {
newVersion = semver.inc(release, "minor", semver.rel);
}
// Otherwise throw an error, because the pre-release version should always be just one
// minor higher than the release version.
else {
throw new Error(
"Version number minors are more than off by one, check package.json and (pre-)published versions manually.",
);
}
if (!semver.valid(newVersion)) {
throw new Error("Invalid version string: ", newVersion);
}
fs.appendFileSync(
process.env.GITHUB_OUTPUT,
`new_version=${newVersion}${os.EOL}`,
);
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
push:
branches: [master]
tags: "*.*.*"
pull_request:
branches: [master]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [
macos-15-intel, # x64
macos-15, # ARM
ubuntu-24.04, # x64
ubuntu-24.04-arm, # ARM
windows-latest,
]
# syntax explanation:
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-additional-values-into-combinations
include:
- os: macos-15-intel
ocaml-compiler: 5.2.1
dune-profile: release
artifact-folder: darwin
- os: macos-15
ocaml-compiler: 5.2.1
dune-profile: release
artifact-folder: darwinarm64
- os: ubuntu-24.04
ocaml-compiler: ocaml-variants.5.2.1+options,ocaml-option-static
dune-profile: static
artifact-folder: linux
- os: ubuntu-24.04-arm
ocaml-compiler: ocaml-variants.5.2.1+options,ocaml-option-static
dune-profile: static
artifact-folder: linuxarm64
- os: windows-latest
ocaml-compiler: 5.2.1
dune-profile: release
artifact-folder: win32
runs-on: ${{matrix.os}}
steps:
# needed for Windows testing
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- name: Cache OCaml's opam
uses: actions/cache@v4
with:
path: ~/.opam
key: ${{matrix.os}}-rescript-vscode-v5
- name: Use OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{matrix.ocaml-compiler}}
opam-pin: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm install --include=optional
- run: opam install dune cppo
- run: npm run compile
- run: npm run bundle
# These 2 runs (or just the second?) are for when you have opam dependencies. We don't.
# Don't add deps. But if you ever do, un-comment these and add an .opam file.
# - run: opam pin add rescript-editor-analysis.dev . --no-action
# - run: opam install . --deps-only --with-doc --with-test
- name: Set dune profile according to platform
run: echo "DUNE_PROFILE=${{ matrix.dune-profile }}" >> $GITHUB_ENV
- name: Install ocamlformat
run: opam install ocamlformat.0.27.0
- name: Format check
run: opam exec -- make checkformat
- name: Build
run: opam exec -- make
- name: Test
run: opam exec -- make test
- name: Strip binaries
if: matrix.os != 'windows-latest'
run: strip rescript-editor-analysis.exe rescript-tools.exe
# Also avoids artifacts upload permission loss:
# https://github.com/actions/upload-artifact/tree/ee69f02b3dfdecd58bb31b4d133da38ba6fe3700#permission-loss
- name: Compress files
run: |
mkdir ${{matrix.artifact-folder}}
mv rescript-editor-analysis.exe ${{matrix.artifact-folder}}
mv rescript-tools.exe ${{matrix.artifact-folder}}
tar -cvf binary.tar ${{matrix.artifact-folder}}
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: ${{matrix.artifact-folder}}
path: binary.tar
- name: Upload platform bindings
if: always()
uses: actions/upload-artifact@v4
with:
name: bindings-${{matrix.artifact-folder}}
path: node_modules/@oxc-parser/
retention-days: 1
package:
needs:
- build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm install --include=optional
- run: npm run compile
- name: Download MacOS binaries
uses: actions/download-artifact@v4
with:
name: darwin
path: binaries
- run: tar -xvf binary.tar
working-directory: binaries
- name: Download MacOS ARM binaries
uses: actions/download-artifact@v4
with:
name: darwinarm64
path: binaries
- run: tar -xvf binary.tar
working-directory: binaries
- name: Download Linux binaries
uses: actions/download-artifact@v4
with:
name: linux
path: binaries
- run: tar -xvf binary.tar
working-directory: binaries
- name: Download Linux ARM binaries
uses: actions/download-artifact@v4
with:
name: linuxarm64
path: binaries
- run: tar -xvf binary.tar
working-directory: binaries
- name: Download Windows binaries
uses: actions/download-artifact@v4
with:
name: win32
path: binaries
- run: tar -xvf binary.tar
working-directory: binaries
- name: Cleanup tar file
run: rm binary.tar
working-directory: binaries
- name: Download platform bindings from all platforms
uses: actions/download-artifact@v4
with:
pattern: bindings-*
path: bindings
merge-multiple: true
- name: Move binaries to folders
run: |
declare -a platforms=("darwin" "darwinarm64" "linux" "linuxarm64" "win32")
for platform in "${platforms[@]}"; do
mkdir server/analysis_binaries/"$platform"
mv binaries/"$platform"/rescript-editor-analysis.exe server/analysis_binaries/"$platform"
done
for platform in "${platforms[@]}"; do
mkdir tools/binaries/"$platform"
mv binaries/"$platform"/rescript-tools.exe tools/binaries/"$platform"
done
- name: Merge platform bindings into node_modules
run: |
mkdir -p node_modules/@oxc-parser
# Copy all bindings from downloaded artifacts
if [ -d "bindings" ]; then
find bindings -type d -name "binding-*" -exec cp -r {} node_modules/@oxc-parser/ \;
fi
# Ensure we have the Linux binding from current platform
npm install --include=optional || true
- name: Store short commit SHA for filename
id: vars
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: echo "sha_short=${COMMIT_SHA:0:7}" >> $GITHUB_OUTPUT
- name: Store tag name
id: tag_name
if: startsWith(github.ref, 'refs/tags/')
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Increment pre-release version
if: github.ref == 'refs/heads/master'
id: increment_pre_release
run: |
JSON=$(npx vsce show chenglou92.rescript-vscode --json)
NEW_VERSION=$(echo $JSON | jq -r '.versions | .[0] | .["version"]')
node .github/workflows/bump-version.js ${NEW_VERSION}
- name: Package Extension
if: github.ref != 'refs/heads/master'
run: npx vsce package --no-yarn -o rescript-vscode-${{ steps.vars.outputs.sha_short }}.vsix
- name: Package Extension pre-release version
if: github.ref == 'refs/heads/master'
run: npx vsce package --no-yarn -o rescript-vscode-latest-master.vsix ${{ steps.increment_pre_release.outputs.new_version }} --no-git-tag-version
- name: Package Extension release version
if: startsWith(github.ref, 'refs/tags/')
run: npx vsce package --no-yarn -o rescript-vscode-${{ steps.tag_name.outputs.tag }}.vsix ${{ steps.tag_name.outputs.tag }} --no-git-tag-version
- name: Verify Package Contents
run: npm run verify-package
- uses: actions/upload-artifact@v4
if: github.ref != 'refs/heads/master'
with:
name: rescript-vscode-${{ steps.vars.outputs.sha_short }}.vsix
path: rescript-vscode-${{ steps.vars.outputs.sha_short }}.vsix
- uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/master'
with:
name: rescript-vscode-latest-master.vsix
path: rescript-vscode-latest-master.vsix
- uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/')
with:
name: rescript-vscode-${{ steps.tag_name.outputs.tag }}.vsix
path: rescript-vscode-${{ steps.tag_name.outputs.tag }}.vsix
- name: Move latest-master tag to current commit
if: github.ref == 'refs/heads/master'
run: |
git tag -d latest-master || true
git push origin --delete latest-master || true
git tag latest-master
git push origin latest-master
- name: Publish latest master to GitHub
if: github.ref == 'refs/heads/master'
uses: softprops/action-gh-release@v2
with:
token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: "latest-master"
prerelease: true
generate_release_notes: true
name: "Latest master"
files: rescript-vscode-latest-master.vsix
- name: Generate release notes from changelog
if: startsWith(github.ref, 'refs/tags/')
run: |
sed -e "/^## ${{ steps.tag_name.outputs.tag }}/,/^## / ! d" CHANGELOG.md | head -n -2 > RELEASE.md
- name: Publish release version to GitHub
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
body_path: RELEASE.md
name: ${{ steps.tag_name.outputs.tag }}
files: rescript-vscode-${{ steps.tag_name.outputs.tag }}.vsix
- name: Publish extension as pre-release
if: github.ref == 'refs/heads/master' && !startsWith(github.event.head_commit.message, 'publish tools')
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --pre-release ${{ steps.increment_pre_release.outputs.new_version }} --no-git-tag-version
- name: Publish extension as release
if: startsWith(github.ref, 'refs/tags/')
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} ${{ steps.tag_name.outputs.tag }} --no-git-tag-version
- name: Publish LSP as pre-release to NPM
if: github.ref == 'refs/heads/master'
working-directory: server
run: |
npm version preminor --preid next-$(git rev-parse --short HEAD)
npm publish --access public --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish LSP to NPM
if: startsWith(github.ref, 'refs/tags/')
working-directory: server
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build @rescript/tools package
working-directory: tools
run: |
npm ci
npm run build
- name: Publish @rescript/tools package
if: ${{ startsWith(github.event.head_commit.message, 'publish tools') && (github.ref == 'refs/heads/master') }}
working-directory: tools
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
================================================
FILE: .gitignore
================================================
.DS_Store
out
node_modules
examples/*/lib
analysis/tests/lib
analysis/tests/.bsb.lock
analysis/tests-generic-jsx-transform/lib
analysis/tests-generic-jsx-transform/.bsb.lock
analysis/tests-incremental-typechecking/lib
analysis/tests-incremental-typechecking/.bsb.lock
tools/node_modules
tools/lib
tools/**/*.res.js
tools/tests/node_modules
tools/tests/lib
rescript-editor-analysis.exe
rescript-tools.exe
_opam/
_build/
*.tsbuildinfo
# VSCode test downloads
.vscode-test/
================================================
FILE: .ocamlformat
================================================
profile = default
version = 0.27.0
field-space = tight-decl
break-cases = toplevel
module-item-spacing = preserve
cases-exp-indent = 2
space-around-arrays = false
space-around-lists = false
space-around-records = false
space-around-variants = false
================================================
FILE: .ocamlformat-ignore
================================================
analysis/vendor/js_parser/**
analysis/vendor/ml/cmt_format.ml
analysis/vendor/ml/parser.ml
analysis/vendor/ml/pprintast.ml
analysis/vendor/ext/bs_hash_stubs.ml
analysis/vendor/ext/js_reserved_map.ml
analysis/vendor/ext/ext_string.ml
analysis/vendor/ext/ext_string.mli
analysis/vendor/ext/ext_sys.ml
analysis/vendor/ext/hash.cppo.ml
analysis/vendor/ext/hash_set.cppo.ml
analysis/vendor/ext/map.cppo.ml
analysis/vendor/ext/ordered_hash_map.cppo.ml
analysis/vendor/ext/set.cppo.ml
analysis/vendor/ext/vec.cppo.ml
**/node_modules/**
================================================
FILE: .prettierignore
================================================
# Ignore artifacts:
server/out
analysis/examples
analysis/reanalyze/examples
tools/tests
.history/
================================================
FILE: .prettierrc
================================================
{}
================================================
FILE: .vscode/extensions.json
================================================
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": ["dbaeumer.vscode-eslint"]
}
================================================
FILE: .vscode/launch.json
================================================
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server",
"port": 6009,
"restart": true,
"outFiles": ["${workspaceRoot}/server/out/**/*.js"]
},
{
"name": "Language Server E2E Test",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
"${workspaceRoot}/client/testFixture"
],
"outFiles": ["${workspaceRoot}/client/out/test/**/*.js"]
}
],
"compounds": [
{
"name": "Client + Server",
"configurations": ["Launch Client", "Attach to Server"]
}
]
}
================================================
FILE: .vscode/settings.json
================================================
{
"editor.insertSpaces": false,
"tslint.enable": true,
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"ocaml.sandbox": {
"kind": "opam",
"switch": "${workspaceFolder:rescript-vscode}"
}
}
================================================
FILE: .vscode/tasks.json
================================================
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "compile",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": ["$tsc"]
},
{
"type": "npm",
"script": "watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": ["$tsc-watch"]
}
]
}
================================================
FILE: .vscodeignore
================================================
.vscode/**
**/*.ts
**/*.map
.gitignore
**/tsconfig.json
contributing.md
.github/**
server/node_modules/.bin
node_modules/.bin
analysis/
tools/
scripts/
dune-project
analysis.opam
tools.opam
.ocamlformat
.ocamlformat-ignore
client/node_modules
server/node_modules
_opam
_build
Makefile
================================================
FILE: AGENTS.md
================================================
# AGENTS.md
This file provides guidance to AI coding assistants when working with code in this repository.
## Project Overview
This is the official ReScript VSCode extension, providing language support for ReScript (.res/.resi files) in Visual Studio Code. The project uses a Language Server Protocol (LSP) architecture with a TypeScript client/server and native OCaml binaries for analysis.
## Architecture
### Key Components
- **client/**: VSCode extension client (`client/src/extension.ts`) - handles UI, commands, and language client initialization
- **server/**: Language Server (`server/src/server.ts`, `server/src/cli.ts`) - implements LSP features, communicates with ReScript compiler
- **analysis/**: Native OCaml binary for code analysis, hover, autocomplete, and other language features. This is for older ReScript versions only (ReScript 11 and below). New features are usually only implemented in the rescript compiler monorepo.
- **tools/**: ReScript tools binary for additional functionality like interface file generation. This is also for older ReScript versions only (ReScript 11 and below). New features are usually only implemented in the rescript compiler monorepo.
- **grammars/**: TextMate grammar files for syntax highlighting
- **snippets.json**: Code snippets for common ReScript patterns
### Build System
The project uses:
- **dune**: For building OCaml components (analysis & tools)
- **esbuild**: For bundling TypeScript client/server
- **npm**: For JavaScript/TypeScript dependencies
- **TypeScript**: For type checking the client/server code
## Development Commands
### Initial Setup
```bash
npm install # Install all dependencies including client/server
opam switch 5.2.0 # Install OCaml switch (if not already done)
opam install . --deps-only # Install OCaml dependencies
```
### Building
```bash
make build # Build OCaml binaries and copy to root
npm run compile # Compile TypeScript (client & server)
npm run bundle # Bundle for production (esbuild)
npm run vscode:prepublish # Clean and bundle (used for publishing)
```
### Development
```bash
npm run watch # Watch TypeScript compilation
make -C analysis test # Run analysis tests
make -C tools/tests test # Run tools tests
make test # Run all tests
```
### Code Quality
```bash
make format # Format OCaml (dune) and JS/TS (prettier)
make checkformat # Check formatting without modifying
make clean # Clean build artifacts
```
### Running the Extension in Development
1. Open the project in VSCode
2. Press F5 to launch a new VSCode window (Extension Development Host)
3. Open a ReScript project to test the extension
## Key Files
### Configuration
- `package.json`: Extension manifest, commands, settings, and scripts
- `rescript.configuration.json`: Editor configuration for ReScript files
- `client/src/extension.ts`: Extension entry point and client initialization
- `server/src/server.ts`: Language server implementation
- `server/src/cli.ts`: CLI entry point for the language server
### OCaml Components
- `analysis/`: Code analysis binary (hover, autocomplete, etc.)
- `tools/`: ReScript tools binary (interface generation, etc.)
### Language Features
- **LSP Features**: hover, goto definition, find references, rename, autocomplete
- **Code Analysis**: dead code detection, exception analysis (via reanalyze)
- **Build Integration**: compile diagnostics, status indicators
- **Commands**: interface creation, file switching, compiled JS opening
## Testing
The project has several test suites:
- `analysis/tests/`: Tests for the analysis binary
- `tools/tests/`: Tests for ReScript tools
- `analysis/tests-incremental-typechecking/`: Incremental typechecking tests
- `analysis/tests-generic-jsx-transform/`: JSX transformation tests
## Project Structure Notes
- The extension supports both `.res` (implementation) and `.resi` (interface) files
- Uses VSCode Language Client protocol for communication between client and server
- Native binaries are cross-platform (darwin, linux, win32) and included in the extension. The rescript-editor-analysis is invoked by the LSP Server in a one-shot mode. Dumping JSON to stdout and the LSP picks that up.
- Supports workspace configurations and monorepo structures
- Incremental type checking can be enabled for better performance on large projects
- As mentioned above the native OCaml binaries here are only here for backwards-compatibility with ReScript versions 11 or below. Since ReScript 12 both `analysis` and `tools` are part of the [ReScript compiler monorepo](https://github.com/rescript-lang/rescript), thus refrain from changing them too much (bugfixes that need to be ported are ok).
================================================
FILE: CHANGELOG.md
================================================
# Changelog
> **Tags:**
>
> - :boom: [Breaking Change]
> - :eyeglasses: [Spec Compliance]
> - :rocket: [New Feature]
> - :bug: [Bug Fix]
> - :memo: [Documentation]
> - :house: [Internal]
> - :nail_care: [Polish]
## [Unreleased]
#### :bug: Bug fix
- Fix Code Analyzer cwd/binary lookup in monorepos (run from workspace root).
- Fix monorepo build detection by only watching the workspace root `.compiler.log`.
- Fix Start Build for ReScript v12+ projects by preferring `rescript.exe`.
- Take namespace into account for incremental cleanup. https://github.com/rescript-lang/rescript-vscode/pull/1164
- Potential race condition in incremental compilation. https://github.com/rescript-lang/rescript-vscode/pull/1167
- Fix extension crash triggered by incremental compilation. https://github.com/rescript-lang/rescript-vscode/pull/1169
- Fix file watchers on Windows when using WSL. https://github.com/rescript-lang/rescript-vscode/pull/1178
#### :nail_care: Polish
- Stale .compiler.log can still spill through in incremental compilation. https://github.com/rescript-lang/rescript-vscode/pull/1167
## 1.72.0
#### :bug: Bug fix
- Fix rewatch lockfile detection on Windows. https://github.com/rescript-lang/rescript-vscode/pull/1160
- Override default `initialConfiguration` with user specific config. https://github.com/rescript-lang/rescript-vscode/pull/1162
#### :nail_care: Polish
- Resolve symlinks when finding platform binaries. https://github.com/rescript-lang/rescript-vscode/pull/1154
- Use `window/logMessage` in LSP Server for logging. https://github.com/rescript-lang/rescript-vscode/pull/1162
## 1.70.0
#### :bug: Bug fix
- Remove automatic paste provider that interfered with default paste behavior. Paste as ReScript JSON/JSX commands are now explicit commands only. https://github.com/rescript-lang/rescript-vscode/pull/1150
- Only paste objects/arrays are JSON.t https://github.com/rescript-lang/rescript-vscode/pull/1148
## 1.68.0
#### :rocket: New Feature
- Paste as JSON.t or ReScript JSX in VSCode. https://github.com/rescript-lang/rescript-vscode/pull/1141
#### :bug: Bug fix
- Pass RESCRIPT_RUNTIME to analysis process. https://github.com/rescript-lang/rescript-vscode/pull/1145
## 1.66.0
#### :bug: Bug fix
- Protect against trying to read non-existant `.compiler.log`. https://github.com/rescript-lang/rescript-vscode/pull/1116
- Detected quoted paths in bsb arguments on Windows. https://github.com/rescript-lang/rescript-vscode/pull/1120
#### :rocket: New Feature
- Add status bar item tracking compilation state. https://github.com/rescript-lang/rescript-vscode/pull/1119
#### :house: Internal
- Find `@rescript/runtime` for Rewatch compiler-args call. https://github.com/rescript-lang/rescript-vscode/pull/1125
- Use `prepareRename` command (when a new enough ReScript version is used) to speed up the `rename` command. https://github.com/rescript-lang/rescript-vscode/pull/1124
- Use `compiler-info.json` to find the `@rescript/runtime` and `bsc.exe` if available. https://github.com/rescript-lang/rescript-vscode/pull/1129
- Add `Dump LSP Server State` command to client. https://github.com/rescript-lang/rescript-vscode/pull/1130
- Use `compiler-info.json` to locate other binaries as well. https://github.com/rescript-lang/rescript-vscode/pull/1135
- Detect Rewatch from workspace root. https://github.com/rescript-lang/rescript-vscode/pull/1135
## 1.64.0
#### :rocket: New Feature
- Find `bsc.exe` and `rescript-code-editor-analysis.exe` from platform-specific packages used by ReScript `v12.0.0-alpha.13`+.https://github.com/rescript-lang/rescript-vscode/pull/1092
- Find `rewatch.exe` from platform-specific packages used by ReScript `v12.0.0-alpha.13`+. https://github.com/rescript-lang/rescript-vscode/pull/1101
#### :bug: Bug fix
- Fix: Dont create empty diagnostic messages. https://github.com/rescript-lang/rescript-vscode/pull/1114
- Fix: `rescript-editor-analysis.exe semanticTokens` sometimes returned invalid JSON, which affected syntax highlighting. https://github.com/rescript-lang/rescript-vscode/pull/1113
- Fix: hang in `rescript-editor-analysis.exe codeAction` that sometimes prevented ReScript files from being saved in VS Code. https://github.com/rescript-lang/rescript-vscode/pull/1112
- Fix: show existing compiler errors and warnings on file open. https://github.com/rescript-lang/rescript-vscode/pull/1103
- Fix: bug where we incorrectly showed a warning notification about something going wrong with incremental type checking, when in fact the compiler was reporting module-related type errors https://github.com/rescript-lang/rescript-vscode/pull/1090
- Fix: bug where we incorrectly showed a warning notification about something going wrong with incremental type checking, when in fact the compiler was reporting multiple definitions of the same type or module name https://github.com/rescript-lang/rescript-vscode/pull/1086
- Fix: incorrect highlighting of `as` inside labelled arguments like `toast` https://github.com/rescript-lang/rescript-vscode/pull/1085
- Fix: bug where incremental analysis does not work when the project folder contains a dot. https://github.com/rescript-lang/rescript-vscode/pull/1080
- Fix: bug where incremental compilation crashes when rewatch is being run in a specific package vs the root of the monorepo. https://github.com/rescript-lang/rescript-vscode/pull/1082
- Fix: Absence of Node.js does not hinder LSP server. https://github.com/rescript-lang/rescript-vscode/pull/1083
- Fix: JSON from `rescript-code-editor-analysis` was not always escaped properly, which prevented code actions from being available in certain situations https://github.com/rescript-lang/rescript-vscode/pull/1089
#### :house: Internal
- Find binary paths asynchronously. On `>=12.0.0-alpha.13` we do this by dynamically importing the `@rescript/{target}` package in the project root. https://github.com/rescript-lang/rescript-vscode/pull/1093
- Remove chokidar from LSP server. We expect LSP clients to support [workspace_didChangeWatchedFiles](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_didChangeWatchedFiles). https://github.com/rescript-lang/rescript-vscode/pull/1096
## 1.62.0
#### :nail_care: Polish
- Remove the built-in formatter since it has been causing more harm than done good. https://github.com/rescript-lang/rescript-vscode/pull/1073
#### :rocket: New Feature
- Port [7292](https://github.com/rescript-lang/rescript/pull/7292): Fix dot completion issue with React primitives. https://github.com/rescript-lang/rescript-vscode/pull/1074
- Add support for "dot completion everywhere". In addition to record fields, dots will now complete for object fields, and pipe completions applicable to the type the dot is on. You can also configure where the editor draws extra pipe completions from via the `@editor.completeFrom` attribute. https://github.com/rescript-lang/rescript-vscode/pull/1054
#### :bug: Bug fix
- Fix bug where type args stopped working in some completions when passed through inline records. https://github.com/rescript-lang/rescript-vscode/pull/1064
- Fix bug where objects weren't actually iterated on, making completions inside of them not work. https://github.com/rescript-lang/rescript-vscode/pull/1065
- Fix bug where pipe completions would not trigger with generic type arguments. https://github.com/rescript-lang/rescript-vscode/pull/1067
## 1.60.0
#### :rocket: New Feature
- Enable incremental typechecking and project config cache by default. https://github.com/rescript-lang/rescript-vscode/pull/1047
#### :house: Internal
- Auto-format vendored OCaml sources like in compiler repo. https://github.com/rescript-lang/rescript-vscode/pull/1053
- All OCaml sources in this repo is now considered "legacy", as the OCaml parts of the editor integration are now shipped with the compiler instead.
## 1.58.0
#### :bug: Bug fix
- Fix an issue where the extension would still crash in a monorepo with rewatch
#### :rocket: New Feature
- Add hightlighting for the new dict literal syntax `dict{}`. https://github.com/rescript-lang/rescript-vscode/pull/934
## 1.56.0
#### :bug: Bug Fix
- Fix a regression with incremental typechecking in monorepos with rewatch, where the workspace directory was not properly set.
- When log files are deleted (due to a clean), the editor tooling doesn't crash anymore.
#### :rocket: New Feature
- Support for the `namespace-entry` feature of rewatch, to allow entrypoint modules for namespaced packages.
## 1.54.0
#### :nail_care: Polish
- Reduce latency of language server by caching a few project config related things. https://github.com/rescript-lang/rescript-vscode/pull/1003
#### :bug: Bug Fix
- Fix edge case in switch expr completion. https://github.com/rescript-lang/rescript-vscode/pull/1002
## 1.52.0
#### :rocket: New Feature
- Experimental support for caching the project config to reduce latency. https://github.com/rescript-lang/rescript-vscode/pull/1000
#### :bug: Bug Fix
- Fix highlighting of other languages being affected by rescript-vscode. https://github.com/rescript-lang/rescript-vscode/pull/973
- Use canonicalized URIs/paths for jump to definition. https://github.com/rescript-lang/rescript-vscode/pull/982
- Fix JSX prop special case in end of JSX element. https://github.com/rescript-lang/rescript-vscode/pull/984
- preserve URI format in canonicalizeUri. https://github.com/rescript-lang/rescript-vscode/pull/990
- Remove workaround for canonicalize function in tests https://github.com/rescript-lang/rescript-vscode/pull/992
- Get completions for writing new field names in a record body expressions in more cases. https://github.com/rescript-lang/rescript-vscode/pull/997
#### :nail_care: Polish
- Make sure doc strings are always on top in hovers. https://github.com/rescript-lang/rescript-vscode/pull/956
- Make JSX completion work for `make` functions of type `React.component<props>`, like what you get when using `React.lazy_`. https://github.com/rescript-lang/rescript-vscode/pull/966
- Hover: print signature above docstrings. https://github.com/rescript-lang/rescript-vscode/pull/969
- Adjust function template snippet return. https://github.com/rescript-lang/rescript-vscode/pull/985
- Don't expand `type t` maker functions in patterns. https://github.com/rescript-lang/rescript-vscode/pull/986
- Use `loc` for identifiers to get more and better completions in certain scenarios with type parameters. https://github.com/rescript-lang/rescript-vscode/pull/993
- Improve the DX of running the code analyzer some. https://github.com/rescript-lang/rescript-vscode/pull/995
#### :rocket: New Feature
- Add support for the rewatch build system for incremental compilation. https://github.com/rescript-lang/rescript-vscode/pull/965
- Add support for Linux ARM64
- Statically linked Linux binaries
- Emit `%todo` instead of `failwith("TODO")` when we can (ReScript >= v11.1). https://github.com/rescript-lang/rescript-vscode/pull/981
- Complete `%todo`. https://github.com/rescript-lang/rescript-vscode/pull/981
- Add code action for extracting a locally defined module into its own file. https://github.com/rescript-lang/rescript-vscode/pull/983
- Add code action for expanding catch-all patterns. https://github.com/rescript-lang/rescript-vscode/pull/987
- Add code actions for removing unused code (per item and for an entire file), driven by `reanalyze`. https://github.com/rescript-lang/rescript-vscode/pull/989
#### :house: Internal
- Update parser and compiler support files to the latest version. https://github.com/rescript-lang/rescript-vscode/pull/998
## 1.50.0
#### :rocket: New Feature
- Extend signature help to work on constructor payloads in both expressions and patterns as well. Can be turned off if wanted through settings. https://github.com/rescript-lang/rescript-vscode/pull/947 https://github.com/rescript-lang/rescript-vscode/pull/954
- Show module docs for file modules. https://github.com/rescript-lang/rescript-vscode/pull/952
#### :nail_care: Polish
- Enhance variant constructor payload completion. https://github.com/rescript-lang/rescript-vscode/pull/946
- Clean occasional dots from "insert missing fields" code action. https://github.com/rescript-lang/rescript-vscode/pull/948
- Pick up code actions in incremental compilation. https://github.com/rescript-lang/rescript-vscode/pull/948
- Various improvements to the signature help functionality. https://github.com/rescript-lang/rescript-vscode/pull/950
- Clean up completion item "details" and "documentation". https://github.com/rescript-lang/rescript-vscode/pull/952
## 1.48.0
#### :bug: Bug Fix
- Stability fixes for the experimental incremental compilation mode. https://github.com/rescript-lang/rescript-vscode/pull/945
## 1.46.0
#### :bug: Bug Fix
- Fix null checks for editor config, so things don't blow up. https://github.com/rescript-lang/rescript-vscode/pull/944
## 1.44.0
#### :rocket: New Feature
- Experimental support for type checking without saving the file :tada:. https://github.com/rescript-lang/rescript-vscode/pull/939
## 1.42.0
#### :bug: Bug Fix
- Fix issue with unlabelled arg code swallowing completions. https://github.com/rescript-lang/rescript-vscode/pull/937
- Fix issue where completion inside of switch expression would not work in some cases. https://github.com/rescript-lang/rescript-vscode/pull/936
- Fix bug that made empty prop expressions in JSX not complete if in the middle of a JSX element. https://github.com/rescript-lang/rescript-vscode/pull/935
## 1.40.0
#### :nail_care: Polish
- Enhance decorator completion. https://github.com/rescript-lang/rescript-vscode/pull/908
- Completion for import attributes in `@module`. https://github.com/rescript-lang/rescript-vscode/pull/913
- Relax filter for what local files that come up in from and regular string completion in `@module`. https://github.com/rescript-lang/rescript-vscode/pull/918
- Make from completion trigger for expr hole so we get a nice experience when completing {from: <com>} in `@module`. https://github.com/rescript-lang/rescript-vscode/pull/918
- Latest parser for newest syntax features. https://github.com/rescript-lang/rescript-vscode/pull/917
- Handle completion for DOM/element attributes and attribute values properly when using a generic JSX transform. https://github.com/rescript-lang/rescript-vscode/pull/919
- Highlight tagged template literal functions as functions. https://github.com/rescript-lang/rescript-vscode/pull/920
- Complete for `type t` values when encountering a `type t` in relevant scenarios. https://github.com/rescript-lang/rescript-vscode/pull/924
- Highlight escaped sequences as a whole and not only the first character. https://github.com/rescript-lang/rescript-vscode/pull/929
- Start highlighting escaped sequences in template literals. https://github.com/rescript-lang/rescript-vscode/pull/929
## 1.38.0
#### :nail_care: Polish
- Prefer Core's `RegExp` when Core is open and completing for regexp functions. https://github.com/rescript-lang/rescript-vscode/pull/903
- Add `%re("")` to the completions list when completing in a position where a regexp value is expected. https://github.com/rescript-lang/rescript-vscode/pull/903
#### :bug: Bug Fix
- Fix issue with completion in nested patterns that would make it not possible to complete for new record fields via trailing commas in certain situations. https://github.com/rescript-lang/rescript-vscode/pull/906
## 1.36.0
#### :bug: Bug Fix
- Fix issue with ambigious wraps in JSX prop values (`<SomeComp someProp={<com>}`) - need to figure out if we're completing for a record body or if `{}` are just wraps for the type of `someProp`. In the case of ambiguity, completions for both scenarios are provided. https://github.com/rescript-lang/rescript-vscode/pull/894
- Many bugfixes around nested pattern and expression completion. https://github.com/rescript-lang/rescript-vscode/pull/892
- Fix (very annoying) issue where empty pipe completion wouldn't work inside of a parenthesised function call: `Console.log(someArray->)` completing at the pipe. https://github.com/rescript-lang/rescript-vscode/pull/895
#### :nail_care: Polish
- More cases of not emitting `_` when completing in expressions. https://github.com/rescript-lang/rescript-vscode/pull/890
#### :house: Internal
- Move `rescript-tools` to OCaml code and make `analysis` an library. https://github.com/rescript-lang/rescript-vscode/pull/855
## 1.34.0
#### :rocket: New Feature
- Complete domProps for lowercase JSX components from `ReactDOM.domProps` if possible. https://github.com/rescript-lang/rescript-vscode/pull/883
- Complete for maker-style functions (functions returning type `t` of a module) when encountering a `type t` in relevant scenarios. https://github.com/rescript-lang/rescript-vscode/pull/884
- Expand type aliases in hovers. https://github.com/rescript-lang/rescript-vscode/pull/881
#### :nail_care: Polish
- Better error recovery when analysis fails. https://github.com/rescript-lang/rescript-vscode/pull/880
- Do not emit `_` when completing in expressions. https://github.com/rescript-lang/rescript-vscode/pull/885
- Include fields when completing a braced expr that's an ID, where it the path likely starts with a module. https://github.com/rescript-lang/rescript-vscode/pull/882
## 1.32.0
#### :bug: Bug Fix
- Fix so that you don't need a leading `#` to complete for polyvariant constructors. https://github.com/rescript-lang/rescript-vscode/pull/874
- Print keyword polyvariant constructors with quotes when doing completions. https://github.com/rescript-lang/rescript-vscode/pull/877
## 1.30.0
#### :rocket: New Feature
- If interface file exists, ask if it should be overwritten. https://github.com/rescript-lang/rescript-vscode/pull/865
#### :bug: Bug Fix
- Proper default for `"uncurried"` in V11 projects. https://github.com/rescript-lang/rescript-vscode/pull/867
- Treat `result` type as a proper built in type. https://github.com/rescript-lang/rescript-vscode/pull/860
- Fix infinite loop when resolving inferred completions when several values in scope has the same name. https://github.com/rescript-lang/rescript-vscode/pull/869
- Fix crash when trying to print recursive polymorphic variants without a concrete definition. https://github.com/rescript-lang/rescript-vscode/pull/851
- Fix `rescript-language-server --version` command. https://github.com/rescript-lang/rescript-vscode/pull/873
- Print exotic polyvariant constructor names with quotes when doing completion. https://github.com/rescript-lang/rescript-vscode/pull/870
#### :nail_care: Polish
- Change end position of cursor when completing `Some(<fieldName>)` in patterns. https://github.com/rescript-lang/rescript-vscode/pull/857
#### :bug: Bug Fix
- Add support for detecting dead fields inside inline records. https://github.com/rescript-lang/rescript-vscode/pull/858
## 1.28.0
#### :bug: Bug Fix
- Fix issue introduced in recent PR for module completion. https://github.com/rescript-lang/rescript-vscode/pull/856
## 1.26.0
#### :bug: Bug Fix
- More robust handling of namespaces in pipe completions. https://github.com/rescript-lang/rescript-vscode/pull/850
## 1.24.0
#### :bug: Bug Fix
- Clean up name of namespaced module when hovering. https://github.com/rescript-lang/rescript-vscode/pull/845
- Don't complete illegal file module names. https://github.com/rescript-lang/rescript-vscode/pull/844
- Fix issue `open` on submodules exposed via `-open` in bsconfig.json/rescript.json, that would cause the content of those `open` modules to not actually appear in autocomplete. https://github.com/rescript-lang/rescript-vscode/pull/842
- Account for namespace when filtering pipe completion items. https://github.com/rescript-lang/rescript-vscode/pull/843
## 1.22.0
#### :nail_care: Polish
- Resolve module aliases in hover. https://github.com/rescript-lang/rescript-vscode/pull/820
## 1.20.0
#### :rocket: New Feature
- Add support for syntax highlighting in `%raw` and `%ffi` extension points. https://github.com/rescript-lang/rescript-vscode/pull/774
- Add completion to top level decorators. https://github.com/rescript-lang/rescript-vscode/pull/799
- Add code action for wrapping patterns where option is expected with `Some`. https://github.com/rescript-lang/rescript-vscode/pull/806
- Better completion from identifiers with inferred types. https://github.com/rescript-lang/rescript-vscode/pull/808
- Make suggested template functions async when the target function returns a promise. https://github.com/rescript-lang/rescript-vscode/pull/816
- Fix code action for inserting undefined record fields in ReScript v11. https://github.com/rescript-lang/rescript-vscode/pull/817
#### :nail_care: Polish
- Revamp "Insert missing cases" code action to make it apply in more cases and be much more robust. https://github.com/rescript-lang/rescript-vscode/pull/804
- Make the completion engine understand async/await. https://github.com/rescript-lang/rescript-vscode/pull/813
- Comments are now automatically closed and indented. https://github.com/rescript-lang/rescript-vscode/pull/815
#### :bug: Bug Fix
- Fix invalid range for `definition`. https://github.com/rescript-lang/rescript-vscode/pull/781
- Don't emit object keys in uppercase as namespace. https://github.com/rescript-lang/rescript-vscode/pull/798
- Fix accidental output of extra `|` when producing exhaustive switch code for polyvariants. https://github.com/rescript-lang/rescript-vscode/pull/805
- Fix JS syntax highlighting in single-line FFI extension points. https://github.com/rescript-lang/rescript-vscode/pull/807
- Fix signature help in uncurried mode. https://github.com/rescript-lang/rescript-vscode/pull/809
- Fix various issues in uncurried mode. https://github.com/rescript-lang/rescript-vscode/pull/810
- Fixes a bug in pattern completion where for example `result` wouldn't complete, due to type variables getting lost/not being instantiated. https://github.com/rescript-lang/rescript-vscode/pull/814
- Fix bug where pipes would not be considered in certain cases when completing for single unlabelled function arguments. https://github.com/rescript-lang/rescript-vscode/pull/818
## 1.18.0
#### :rocket: New Feature
- Docstring template Code Action. https://github.com/rescript-lang/rescript-vscode/pull/764
- Improve unlabelled argument names in completion function templates. https://github.com/rescript-lang/rescript-vscode/pull/754
- Add `Some(fieldName)` case when completing in a pattern with an option on a record field. https://github.com/rescript-lang/rescript-vscode/pull/766
#### :bug: Bug Fix
- Fix URL scheme for Code Action. https://github.com/rescript-lang/rescript-vscode/pull/748
- Support uncurried functions in various places where we look up and use function types. https://github.com/rescript-lang/rescript-vscode/pull/771
## 1.16.0
#### :rocket: New Feature
- Greatly extend completion abilities for unsaved code. WARNING: Might be a bit unstable initially. Report any issues you see. https://github.com/rescript-lang/rescript-vscode/pull/712
- Provide hovers for more unsaved code via the new completion features. https://github.com/rescript-lang/rescript-vscode/pull/749
## 1.14.0
#### :rocket: New Feature
- Enable completion for `Js.Exn.Error(error)` when pattern matching on `exn`. This is to make the `Js.Exn.Error` API more discoverable. https://github.com/rescript-lang/rescript-vscode/pull/728
#### :nail_care: Polish
- Signature Help is now considered stable, and enabled for all users. Can still be turned off in settings.
- Show whether record fields and variant constructors are deprecated when completing. https://github.com/rescript-lang/rescript-vscode/pull/731
- Prettify how optional record fields are printed in the completion item detail. https://github.com/rescript-lang/rescript-vscode/pull/737
#### :bug: Bug Fix
- Fix crashes in document symbol requests when broken syntax exists. https://github.com/rescript-lang/rescript-vscode/pull/736
## 1.12.0
#### :rocket: New Feature
- Add autocomplete for function argument values (booleans, variants and options. More values coming), both labelled and unlabelled. https://github.com/rescript-lang/rescript-vscode/pull/665
- Add autocomplete for JSX prop values. https://github.com/rescript-lang/rescript-vscode/pull/667
- Add snippet support in completion items. https://github.com/rescript-lang/rescript-vscode/pull/668
- Add support from completing polyvariants as values. https://github.com/rescript-lang/rescript-vscode/pull/669
- Add support for completion in patterns. https://github.com/rescript-lang/rescript-vscode/pull/670
- Add support for pattern completion of unsaved tuples. https://github.com/rescript-lang/rescript-vscode/pull/679
- Add support for completion in typed expressions. https://github.com/rescript-lang/rescript-vscode/pull/682
- Complete for `React.element` creator functions (`React.string` etc) when in JSX context. https://github.com/rescript-lang/rescript-vscode/pull/681
- Handle optional record fields in expression/pattern completion. https://github.com/rescript-lang/rescript-vscode/pull/691
- Expand options in completion to make working with options a bit more ergonomic. https://github.com/rescript-lang/rescript-vscode/pull/690
- Let `_` trigger completion in patterns. https://github.com/rescript-lang/rescript-vscode/pull/692
- Support inline records in completion. https://github.com/rescript-lang/rescript-vscode/pull/695
- Add way to autocomplete an exhaustive switch statement for identifiers. Example: an identifier that's a variant can have a switch autoinserted matching all variant cases. https://github.com/rescript-lang/rescript-vscode/pull/699
- Support typed expression completion for lowercase (builtin) JSX tags. https://github.com/rescript-lang/rescript-vscode/pull/702
- Support typed expression completion driven by type annotations. https://github.com/rescript-lang/rescript-vscode/pull/711
- Completion for lowercase JSX elements, treating them like HTML elements. https://github.com/rescript-lang/rescript-vscode/pull/719
#### :nail_care: Polish
- Prefer opened `Belt` modules in autocomplete when `-open Belt` is detected in `bsconfig`. https://github.com/rescript-lang/rescript-vscode/pull/673
- Improve precision in signature help. You now do not need to type anything into the argument for it to highlight. https://github.com/rescript-lang/rescript-vscode/pull/675
- Remove redundant function name in signature help, to clean up what's shown to the user some. https://github.com/rescript-lang/rescript-vscode/pull/678
- Show docstrings in hover for record fields and variant constructors. https://github.com/rescript-lang/rescript-vscode/pull/694
- The necessary leading `?` is now automatically inserted for optional fields when destructuring records. https://github.com/rescript-lang/rescript-vscode/pull/715
#### :bug: Bug Fix
- Highlight `catch` like a keyword https://github.com/rescript-lang/rescript-vscode/pull/677
- Make signature help work in calls nested inside of other calls. https://github.com/rescript-lang/rescript-vscode/pull/687
- Fix pipe completion to work on aliased types. https://github.com/rescript-lang/rescript-vscode/pull/700
- Fix issue with not finding type for function arguments. https://github.com/rescript-lang/rescript-vscode/pull/706
- Fix incorrect syntax in hover help for module. https://github.com/rescript-lang/rescript-vscode/pull/709
## v1.10.0
#### :nail_care: Polish
- Remove spacing between type definition in clients that do not support markdown links. https://github.com/rescript-lang/rescript-vscode/pull/619
- Rename custom LSP methods names. https://github.com/rescript-lang/rescript-vscode/pull/611
- Better performance for Inlay Hints and Codelens. https://github.com/rescript-lang/rescript-vscode/pull/634
- Accept both `@ns.doc` and the new `@res.doc` for the internal representation of doc comments. And both `@ns.optional` and `@res.optional` for the optional fields. https://github.com/rescript-lang/rescript-vscode/pull/642
- Make pipe completion work more reliably after function calls. https://github.com/rescript-lang/rescript-vscode/pull/656
- Make pipe completion work in pipe chains, not just on the first pipe. https://github.com/rescript-lang/rescript-vscode/pull/656
- Make pipe completion work reliably when the path resolution needs to traverse submodules https://github.com/rescript-lang/rescript-vscode/pull/663
- Make pipe completion work (after saving/compiling) when the return type of a function call is unknown until compilation https://github.com/rescript-lang/rescript-vscode/pull/662
- Add pipe completion for `int` and `float` constants https://github.com/rescript-lang/rescript-vscode/pull/664
#### :bug: Bug Fix
- Fix issue where `-open Some.Path` in `"bsc-flags"` would sometimes be treated differently from `open Some.Path` locally in a file https://github.com/rescript-lang/rescript-vscode/pull/616
- Fix issue where doc comment is not shown on hover in case of shadowed identifier (in particular for JSX V4 components which shadow `make`) https://github.com/rescript-lang/rescript-vscode/issues/621
- Adapt command to create interface files to latest JSX V4 (no key prop, possibly empty record) https://github.com/rescript-lang/rescript-vscode/issues/617
- Fix issue where pipes were not taken into account in the signature help, resulting in the highlighted argument in signature help always being off by one for unlabelled arguments in piped expressions https://github.com/rescript-lang/rescript-vscode/issues/626
- Fix incorrect type hint for module type. https://github.com/rescript-lang/rescript-vscode/pull/626
- Fix file location in Document Symbols response. https://github.com/rescript-lang/rescript-vscode/issues/629
- Fix issue where create interface file would not work with certain JSX V4 components https://github.com/rescript-lang/rescript-vscode/issues/617
- Fix issue with completing `foo. x` where `x` should not be part of the completion https://github.com/rescript-lang/rescript-vscode/pull/644
- Fix issue where code analysis would not track types in inner modules across implementations and interfaces https://github.com/rescript-association/reanalyze/issues/186
- Fix issue with references to elements defined in an interface file https://github.com/rescript-lang/rescript-vscode/pull/646
- Fix issue with references from implementation files which also happen to have interface files https://github.com/rescript-lang/rescript-vscode/issues/645
- Fix issue where jump to definition would go to the wrong place when there are aliased identifiers in submodules https://github.com/rescript-lang/rescript-vscode/pull/653
- Fix issue where document symbols were not shown nested https://github.com/rescript-lang/rescript-vscode/pull/655
## v1.8.2
#### :rocket: New Feature
- Add configuration parameter `"transitive"` under `"reanalyze"` is `bsconfig.json` and make reportst non-transitive by default. If set to `false`, the analysis does not report transitively dead items. So removing the reported item individually can be done in isolation. This is a more fine-grained process for guiding the user to remove dead code one item at a time. https://github.com/rescript-lang/rescript-vscode/pull/601 https://github.com/rescript-lang/rescript-vscode/pull/610
This feature comes from a conversation with @jfmengels on how https://github.com/jfmengels/elm-review is designed.
#### :bug: Bug Fix
- Fix issue where module paths in `-open` in `bsc-flags` such as "-open ReScriptJs.Js" were not recognized https://github.com/rescript-lang/rescript-vscode/issues/607
## v1.8.1
#### :rocket: New Feature
- Add support for prop completion for JSX V4 https://github.com/rescript-lang/rescript-vscode/pull/579
- Add support for create interface file for JSX V4 https://github.com/rescript-lang/rescript-vscode/pull/580
- Expand one level of type definition on hover. Dig into record/variant body. https://github.com/rescript-lang/rescript-vscode/pull/584
- Add clickable links to type definitions in hovers. https://github.com/rescript-lang/rescript-vscode/pull/585
- Add experimental signature help for function calls. https://github.com/rescript-lang/rescript-vscode/pull/547
#### :bug: Bug Fix
- Fix printing of record types with optional fields https://github.com/rescript-lang/rescript-vscode/pull/584
## v1.6.0
#### :rocket: New Feature
- Inlay Hints (experimental). `rescript.settings.inlayHints.enable: true`. Turned off by default. https://github.com/rescript-lang/rescript-vscode/pull/453
- Code Lenses for functions (experimental). `rescript.settings.codeLens: true`. Turned off by default. https://github.com/rescript-lang/rescript-vscode/pull/513
- Markdown code blocks tagged as `rescript` now get basic syntax highlighting. https://github.com/rescript-lang/rescript-vscode/pull/97
- Hover support for doc comments on v10 compiler `/** this is a doc comment */`
#### :bug: Bug Fix
- Fix issue where debug output would end up in the JSON file produced by Reanalyze https://github.com/rescript-lang/rescript-vscode/pull/575
- Fix issue where autocomplete would not perform type instantiation https://github.com/rescript-lang/rescript-vscode/pull/561
- Fix issue where hovering over a field in record construction would show the type without instantiating its type arguments https://github.com/rescript-lang/rescript-vscode/pull/560
- Fix Incorrect semantic highlighting of `external` declarations https://github.com/rescript-lang/rescript-vscode/pull/517
- Fix issue where doc comment with nested comments inside is not shown properly on hover https://github.com/rescript-lang/rescript-vscode/pull/526
- Fix server crashes when open file is removed from disk with inlayHints enabled https://github.com/rescript-lang/rescript-vscode/issues/538
- Fix inlay hint for destructured record/array https://github.com/rescript-lang/rescript-vscode/issues/536
## v1.4.2
#### :bug: Bug Fix
- Fix finding the ReScript bin for even more kinds of setups.
- Document the process of finding the ReScript bin in README.
## v1.4.1
#### :bug: Bug Fix
- Fix formatting not preferring the locally installed formatter (if available), which made formatting potentially different between formatting via `rescript format` and the extension.
- Fix finding the ReScript bin in monorepos
## v1.4.0
#### :rocket: New Feature
- Add command: ReScript: Restart Language Server
- Extend integration with reanalyze for code analysis. Support both `dce` and `exception` analysis which can be configured to e.g. both run by adding `{"reanalyze": {"analysis": ["dce", "exception"]} }` in `bsconfig.json`.
- Add configuration option for suppressing the "Do you want to start a build?" prompt.
- Add configuration option for autostarting the Code Analyzer.
- Report syntax errors as you type.
#### :bug: Bug Fix
- Fix issue with autocompletion for constructors in switch statements.
- Fix issue with autocompletion inside template expressions.
- Fix handling of local opens.
- Fix extension crash when renaming a file.
- Fix issue where the server would crash on genType's errors.
- Fix issue where the server would crash if the project contains an OCaml file with a syntax error.
- Fix issue where `@inline` was not suported by the command to generate an interface file.
#### :nail_care: Polish
- Add hover information with links to documentation for decorators.
- Sync with latest parser/printer.
#### :house: Internal
- Support paths to rescript executables in arm64 architectures.
#### :boom: Breaking Change
- Drop support for `bs-patform`. Only `rescript` supported.
## 1.3.0
- Fix issue where using paths of the form `./something` would show multiple copies of the same file in vscode.
- When hovering on a field access, show the instantiated type of the field.
- Support autocomplete for objects from another module `M.x[...`.
- Fix command for creating interface files when the project uses namespaces.
- Added command `ReScript: Open the compiled JS file for this implementation file.`.
- Use semantic syntax highlighting (https://github.com/rescript-lang/rescript-vscode/pull/367).
- Report "Fatal error" when it happens in the compiler log (e.g. a make function with type annotation) and don't crash the extension.
- Fix issue in functions the form "~foo as name" where the location would only cover "ame".
- Extend the command to create an interface file, to support components and ReScript decorators used in bindings.
- Enable formatting files without needing the file to be in an actual ReScript project.
- New feature: Show Outline which was previously disabled.
- Add command to quickly switch between implementation and interface file.
- Support hover on JSX props and labelled arguments.
## 1.2.1
- Fix issue with highlighting of interpolation strings (those with backticks) introduced in release 1.2.0.
- Fix crash when the project contains OCaml files that have warnings.
- Fix crash on hover when a dependency contains a type with functor application. This is not expressible in ReScript syntax, but can appear in a dependent OCaml package and be pulled in for processing by the extension.
- Remove obsolete `@bs` snippets
## 1.2.0
Features:
- Add autocompletion for object access of the form `foo["x"]` and `foo["x"]["y"]["z"]`.
- Support autocomplete of records for variables defined in other files.
- Improve autocomplete when several values have the same name, with a heuristic to approximate the correct scope.
- Add a "Dead Code Analysis" mode that will highlight globally dead values, redundant optional arguments, dead modules, dead types (records and variants) ([#334](https://github.com/rescript-lang/rescript-vscode/pull/334))
Fixes:
- Fix issue in JSX autocomplete when the component is declared external.
- Fix jump-to-definition for uncurried calls.
- Fix issue where values for autocomplete were pulled from implementations instead of interfaces.
- Fix issue with autocomplete then punned props are used in JSX. E.g. `<M foo ...>`.
- Fix issue with JSX autocompletion not working after `foo=#variant`.
- Fix issue in JSX autocompletion where the `key` label would always appear.
- Fix issue in record field autocomplete not working with type aliases.
- Fix issue where autocomplete for local values would not work in the presence of `@react.component` annotations.
- Fix issue where the server would crash on large output produced by the binary command.
- Fix issue where the server would crash when a file has a self cycle.
## 1.1.3
Features:
- Find references to files as modules.
- Autocomplete: skip inline comments to decide if a labeled argument was already supplied.
- Rename: support file rename when renaming a module name.
- Rename: use renameProvider to give a warning when it's not a symbol that can be renamed.
- Jump to definition: support jumping to type definition.
- Jump to definition: jump to the `res` file when both `res` and `resi` are present.
- Restore creation of interface files (fully supported from compiler 9.1.3 onwards).
## 1.1.2
Features:
- Rename has landed! Works across-files!
- More autocomplete improvements.
- Wider Linux support.
## 1.1.1
This update contains _lots_ of autocomplete, hover and jump-to-definition improvements. We'll list only a few below.
Fixes:
- Jump-to-definition on some Windows paths.
- `->` autocomplete overruled `.`.
- Hover on components in interface files.
Features:
- Show References! Works cross-files too.
- Hover now supports markdown docs.
- Hover on labels in component functions with compiler version 9.1, and labels with type annotation.
- Don't show file path on hover and autocomplete (cleaner).
- Autocomplete for props in JSX components.
- `->` autocomplete for built-in list, array, string, option types. And for string and array literals.
- Slimmer download.
Breakages:
- Very old linux versions are no longer supported.
- Hover: no more odoc format support (but it'll still display as text).
## 1.0.8
Fixes:
- Diagnostics display for long lines.
Features:
- Full support for the newest `rescript` npm package!
- Highlight type parameters.
## 1.0.7
Fixes:
- Highlighting for some decorators and keywords.
- Various hover & autocomplete opportunities.
Features:
- Autocomplete for `->` pipe!
- Autocomplete for decorators such as `@module` and `@val` and `@deprecated`.
- Autocomplete for labels `func(~...)`.
- Support for the upcoming `rescript` npm package.
## 1.0.6
Fixes:
- Diagnostics crashing when a file's range isn't found (advice: use fewer ppxes that cause these bugs!). See [#77](https://github.com/rescript-lang/rescript-vscode/issues/77).
- Weird behaviors when project path contains white space.
- Proper audit of the windows bugs. Windows is now officially first-class!
Syntax colors:
- Highlight operators for default VSCode dark+ theme. This means slightly less diverse highlight for the other themes that previously already highlighted operators.
- Worked with [One Dark Pro](https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme) and [Mariana Pro](https://marketplace.visualstudio.com/items?itemName=rickynormandeau.mariana-pro). We now officially recommend these 2 themes, in addition to the existing recommendations in README.
- Highlight deprecated elements using the deprecation scopes.
- JSX bracket highlight fix (still no color; before, some parts were erroneously highlighted).
## 1.0.5
Features:
- Custom folding. See README.
- Support for doc strings when hovering on modules.
- Jump to type definition for types defined in inner modules.
Fixes:
- Properly highlight nested comments.
- Windows diagnostics!
- Removed a potential infinite loop issue in autocomplete.
- Don't autocomplete `open MyModule` inside line comments.
- Don't print parentheses as in `A()` for 0-ary variants.
## 1.0.4
- Some diagnostics watcher staleness fix.
- Various type hover fixes.
- Monorepo/yarn workspace support.
## 1.0.2
- All the usual features (type hint, autocomplete) now work on `bsconfig.json` too!
- Snippets, to ease a few syntaxes.
- Improved highlighting for polymorphic variants. Don't abuse them please.
## 1.0.1
- Fix temp file creation logic.
## 1.0.0
Official first release!
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
Thanks for your interest. Below is an informal spec of how the plugin's server communicates with the actual compiler. If you're a ReScript editor plugin implementor, you should probably read this to understand the various important nuances and copy it.
## Repo Structure
```
.
├── client // Language Client. VSCode UI
│ └── src
│ └── extension.ts // Language Client entry point
├── analysis // Native binary powering hover, autocomplete, etc.
│ ├── src // Analysis library
│ ├── bin // Analysis binary
├── package.json // The extension manifest
├── server // Language Server. Usable standalone
│ ├── src
│ │ ├── server.ts // Language Server Module
│ │ ├── cli.ts // LSP CLI
│ └── analysis_binaries // Prod-time platform-specific analysis binaries
│ ├── darwin
│ ├── linux
│ └── win32
└── tools // ReScript Tools
├── bin // OCaml Binary
├── src // ReScript Tools library
└── binaries // Prod-time platform-specific binaries
├── darwin
├── linux
└── win32
```
## Install Dependencies
- Run `npm install` at the root. This will also install the npm modules for both the `client` and `server` folders.
## OCaml Code
This is needed for the `analysis` and `tools` folder, which is native code.
At the root:
```sh
# If you haven't created the switch, do it. OPAM(https://opam.ocaml.org)
opam switch 5.2.0 # can also create local switch with opam switch create . 5.2.0
# Install dev dependencies from OPAM
opam install . --deps-only
# For IDE support, install the OCaml language server and OCaml Formatter
opam install ocaml-lsp-server ocamlformat
```
You need `dune` to build the OCaml source code, if it is not available in your shell try running `eval $(opam env)`.
If `dune` is present, run `make build` to build the OCaml projects and copy the binaries to the root.
## Build & Run
- `npm run compile`. You don't need this if you're developing this repo in VSCode. The compilation happens automatically in the background.
- `make`.
## Test
- Open VS Code to the project root.
- Switch to the Debug viewlet (command palette -> View: Show Run and Debug).
- Select `Client + Server` from the drop down, launch it (green arrow):
<img width="235" alt="image" src="https://user-images.githubusercontent.com/1909539/97448097-7d186a80-18ed-11eb-82d6-d55b70f54811.png">
If you're getting some Promise-related error alert: this is a VSCode and/or template bug.
- If that newly launched VSCode test instance has no project in its explorer view, drag in a random project.
- Kill all your node processes.
- Redo the launch.
- In the [Extension Development Host] instance of VSCode that just opened, open a `.res` file.
- Try various features.
- When you make a change, Go to the same Debug viewlet's Call Stack panel and restart the client and the server:
<img width="359" alt="image" src="https://user-images.githubusercontent.com/1909539/97448639-19db0800-18ee-11eb-875a-d17cd1b141d1.png">
- For the native analysis and tools binary tests: `make test`.
## Change the Grammar
The _real_ source of truth for our grammar is at https://github.com/rescript-lang/rescript-sublime. We port that `sublime-syntax` grammar over to this weaker TextMate language grammar for VSCode and the rest. There are some subtle differences between the 2 grammars; currently we manually sync between them.
- Modify `grammars/rescript.tmLanguage.json`.
For more grammar inspirations, check:
- [TypeScript's grammar](https://github.com/microsoft/TypeScript-TmLanguage/blob/a771bc4e79deeae81a01d988a273e300290d0072/TypeScript.YAML-tmLanguage)
- [Writing a TextMate Grammar: Some Lessons Learned](https://www.apeth.com/nonblog/stories/textmatebundle.html)
## Snippets
Snippets are also synced from https://github.com/rescript-lang/rescript-sublime. VSCode snippets docs [here](https://code.visualstudio.com/api/references/contribution-points#contributes.snippets).
## Binary Invocation
We call a few binaries and it's tricky to call them properly cross-platform. Here are some tips:
- We try to call the binaries synchronously to avoid races.
- Make sure you cater to calling a binary and passing e.g. a path with whitespace in it.
- `execFile` and its sync version do the above for free.
- `execFile` does not work on windows for batch scripts, which is what Node scripts are wrapped in. Use `exec`. See more [here](https://github.com/rescript-lang/rescript-vscode/blob/8fcc1ab428b8225c97d2c9a5b8e3a782c70d9439/server/src/utils.ts#L110).
- Thankfully, many of our binaries are native, so we can keep using `execFile` most of the time.
## General Coding Guidance
- `server/` is a standalone LSP server. Keep it light, don't add deps unless absolutely necessarily, and don't accidentally use a runtime dep from the top level `package.json`.
- This codebase stayed alive by not trying to babysit long-living processes. Be fast, call a binary and shut down.
## Rough Description Of How The Plugin Works
### Text Changes
The flow below shows how the LSP server reacts to incremental text changes and produces diagnostics:
```mermaid
flowchart TD
A[Your ReScript file in your editor]
B[LSP Client]
C[LSP Server]
D[bsc]
A -->|Type a character| B
B -->|textDocument/didChange| C
subgraph LSP_Server_Internal_Flow["LSP Server"]
C1[triggerIncrementalCompilationOfFile]
C2[compileContents]
C3[figureOutBscArgs]
C4[parse .compiler.log]
end
C --> C1
C1 --> C2 --> C3
C3 -->|invoke| D
D -->|writes| C4
C4 -->|textDocument/publishDiagnostics| B
```
### Completion
The flow below shows how the LSP server handles completion requests by delegating to the native analysis binary:
```mermaid
flowchart TD
A[Your ReScript file in your editor]
B[LSP Client]
C[LSP Server]
D[rescript-editor-analysis.exe]
A -->|Trigger completion| B
B -->|textDocument/completion| C
subgraph LSP_Server_Internal_Flow["LSP Server"]
C1[shell out to rescript-editor-analysis.exe]
C2[build completion response]
end
C --> C1
C1 -->|exec| D
D --> C2
C2 -->|textDocument/completion response| B
```
### Editor Diagnostics
They should be synced in from `lib/bs/.compiler.log` build. Don't take them from other places.
### `.compiler.log`
The build output is streamed into `lib/bs/.compiler.log`. Here are its various states, numbered here:
1. Doesn't exist: artifacts not built yet, or cleaned away.
2. Present, without a final line `#Done`: still building.
3. Present, with the final line `#Done`: finished building.
Barring FS errors, there should be no other state to `.compiler.log`. Among others, this means the file is never present but empty.
The compiler log contains exactly the same things you'd see in a regular terminal `bsb` guild, except:
- The errors are indented 2 spaces
- The extra `#Start` and `#Done` (which aren't indented).
A parser for the diagnostics is [here](https://github.com/rescript-lang/rescript-vscode/blob/0dbf2eb9cdb0bd6d95be1aee88b73830feecb5cc/server/src/utils.ts#L129-L329).
### State 1
Artifacts cleaning through `bsb -clean` removes `.compiler.log` and turns into state 1. If that's the case, remove the diagnostics in the editor too. One could argue that they should be kept, but that's misleading UX-wise, and harder to implement correctly.
### Streaming Update of Diagnostics
After saving a file and running the build, the results stream into the log file. Unfortunately, UX-wise, in the editor, this might look like the diagnostics are suddenly gone then coming back in file by file. This looks bad. To remediate:
- If it's in state 2, update those particular files' diagnostics but don't wipe the files' diagnostics yet.
- If in state 3, finish by clean up the rest of the old diagnostics. This means there's a bit of bookeeping needed here. Make sure you get it right. It's possible for a build to be interrupted (and therefore state 4 never reached) and restarted.
Even this fix isn't great. Ideally, the editor's diagnostics can be greyed out while we're updating them...
Keep in mind that you might be tracking multiple `.compiler.log`s. You should do the above for each.
### Stale Diagnostics Detection
To check whether the artifacts are stale, do **not** check `.bsb.lock` at the project root. This is unreliable, since it's possible that `bsb` wasn't running in watcher mode. We also don't want to encourage overuse of the watcher mode, though it seems increasingly common.
We currently do that; we wish we aren't.
<!-- Instead, do `bsb.exe -- -n` -->
### Files from Other Projects
It's possible to open files from different projects into the same editor instance. In that case, also read _that_ file's project's `.compiler.log`.
The bad alternatives are:
- Not show that file's project's errors. That's wrong for several reasons (looks like the file has no error, assumes an editor window has a default project, etc.).
- Show only that file's error. That's just weird, the errors are already read from that project's `.compiler.log`. Might as well show all of them (?).
## Running `bsb` in the Editor
**Don't** do that unless you've prompted the user. This plugin currently prompts the user upon opening thr first the first file of a project. It's not great, but otherwise lots of folks forget to start a `bsb` in the terminal to see the freshest diagnostics.
Drawbacks:
- Running an implicit `bsb -w` means you've acquired the build watch mode lockfile. The user won't be able to run his/her own `bsb -w` in the terminal.
- Running a one-shot `bsb` doesn't conflict, but is a waste. It's also incorrect, as there might be external file system changes you're not detecting, e.g. version control changes.
- The build might be a step in a bigger build. The editor running `bsb -w` by itself might clash with that.
- If you have multiple files with different project roots open, running all of the `bsb -w`s is too intense.
## Format
To find the location of `bsc.exe` to run the formatter:
- Search in the file's directory's `node_modules/bs-platform/{platform}/bsc.exe`. If not found, recursively search upward (because [monorepos](https://github.com/rescript-lang/rescript-vscode/blob/0dbf2eb9cdb0bd6d95be1aee88b73830feecb5cc/server/src/utils.ts#L39-L45)).
- Do **not** directly use `node_modules/.bin/bsc` if you can help it. That's a Nodejs wrapper. Slow startup. We don't want our formatting to be momentarily stalled because some Nodejs cache went cold.
- `platform` can be `darwin`, `linux`, `win32` or `freebsd`.
### Formatting Newline
The formatted result should be taken as-is, without any extra string trimming and newline addition/removal by the editor plugin.
### Formatting Errors
The errors returned from `bsc.exe -format` should be discarded; in theory, they should have been duplicates of the errors from `.compiler.log`.
In the future, we should consier showing the format errors when `.compiler.log` isn't found.
## Analysis bin
Analysis bin is what we currently call the OCaml code that does deeper language related analysis, and that powers most of the language specific functionality like hovers, completion, and so on. Here's a list of PRs and other resources you can have a look at if you're interested in contributing to the analysis bin:
- Implementing "code lens" for function definitions. PR + commits have a bunch of comments intended to be educational as to what's done where, and why. https://github.com/rescript-lang/rescript-vscode/pull/513
- Cristiano fixes a bug where autocomplete wasn't working in switch branches, because the analysis did not cover that context. Contains a bunch of good comments on how the test setup works, etc. https://github.com/rescript-lang/rescript-vscode/pull/415
We're happy to gather more resources over time here, including more in-depth getting started guides.
## Releasing the VSCode extension and standalone LSP package
_This below will automatically release the LSP package as well._
1. Bump the version to an _even minor_ version number in `package.json` and `server/package.json` and their lockfiles. It's very important that it's an even minor like `1.8.0`, and not `1.7.0`. This is because even minors are reserved for actual releases, and uneven minors for pre-releases. Commit and push the version bump.
2. Let CI build your version bump commit.
3. Tag the commit with the version number (e.g. `git tag 1.6.0`) and push the tag (e.g. `git push origin 1.6.0`). Another build will trigger, which should automatically:
- create a `rescript-vscode-<version-number>.vsix` file
- publish that extension version to the VSCode marketplace
- create an automatic release on GitHub
If that somehow does not work, you can do the above steps manually:
1. Download the autogenerated `.vsix` from the previous successful CI run, unzip it, and rename it to `rescript-vscode-<version-number>.vsix` (`rescript-vscode-1.3.0.vsix` for example).
2. Go to the appropriate [VSCode Marketplace Publisher](https://marketplace.visualstudio.com/manage/publishers/chenglou92), select the three dots next to the extension name, and choose `Update`. Upload your `.vsix` there.
3. Not done! Make a new manual release [here](https://github.com/rescript-lang/rescript-vscode/releases), and make sure you attach the generated `.vsix` onto that new release as well. This is for folks who don't use the VSCode marketplace.
For beta releases, ask folks to use the pre-release version installable from the VSCode Marketplace.
## Releasing the `@rescript/tools` package
The tools package is released by bumping the version in `tools/package.json` and run `node scripts/updateVersion.js`, running `npm i` in the `tools/` folder, and then pushing those changes with the commit message `publish tools`.
================================================
FILE: LICENSE.txt
================================================
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: Makefile
================================================
SHELL = /bin/bash
build:
dune build
cp -f _build/install/default/bin/rescript-editor-analysis analysis/rescript-editor-analysis.exe
cp -f _build/install/default/bin/rescript-editor-analysis rescript-editor-analysis.exe
cp -f _build/install/default/bin/rescript-tools rescript-tools.exe
test:
make -C analysis test
make -C tools/tests test
clean:
dune clean
make -C analysis clean
make -C tools/tests clean
format:
dune build @fmt --auto-promote
npx prettier --write --experimental-cli .
checkformat:
dune build @fmt
npx prettier --check --experimental-cli .
.DEFAULT_GOAL := build
.PHONY: build clean test
================================================
FILE: README.md
================================================
<h1 align="center">
<a href="https://marketplace.visualstudio.com/items?itemName=chenglou92.rescript-vscode">ReScript VSCode</a>
</h1>
<p align="center">The Official VSCode plugin for ReScript</p>
<p align="center">
<img src="https://user-images.githubusercontent.com/1909539/101266821-790b1400-3707-11eb-8e9f-fb7e36e660e6.gif"/>
</p>
## Contents
- [Contents](#contents)
- [📝 Prerequisite](#-prerequisite)
- [🌈 Supported Themes](#-supported-themes)
- [💡 Features](#-features)
- [📥 Installation](#-installation)
- [Pre-release channel](#pre-release-channel)
- [📦 Commands](#-commands)
- [🔨 Settings](#-settings)
- [🚀 Code Analyzer](#-code-analyzer)
- [Configuring the Code Analyzer](#configuring-the-code-analyzer)
- [Usage](#usage)
- [Caveats](#caveats)
- [🪄 Tips \& Tricks](#-tips--tricks)
- [Hide generated files](#hide-generated-files)
- [📰 Changelog](#-changelog)
- [👏 How to Contribute](#-how-to-contribute)
- [📄 License](#-license)
## 📝 Prerequisite
You **must** have [ReScript](https://www.npmjs.com/package/rescript) >= 9.1 installed locally in your project, through the usual [npm or yarn installation](https://rescript-lang.org/docs/manual/latest/installation#integrate-into-existing-js-project). Older versions are not guaranteed to work.
## 🌈 Supported Themes
Our highlighting works well with most popular VSCode themes, such as:
- Dark+ (default dark), Light+ (default light)
- Solarized Dark, Solarized Light
- Monokai Dimmed
- Tomorrow Night Blue
- [One Dark Pro](https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme)
The only 2 themes we don't (and can't) support, due to their lack of coloring, are:
- Dark (Visual Studio), Light (Visual Studio)
> **Note**
> If your custom theme doesn't seem to highlight much (e.g. no colors for upper-case JSX tag, no distinction between module and variant), try one of the recommended themes to see if that's the problem. For more info, see [this post](https://github.com/rescript-lang/rescript-vscode/pull/8#issuecomment-764469070).
## 💡 Features
- Supports `.res`, `.resi`, `rescript.json` and the legacy config file `bsconfig.json`.
- Syntax highlighting.
- Formatting.
- Build diagnostics.
- Built-in bsb watcher (optional, and exposed explicitly as a pop-up; no worries of dangling build).
- Type hint hover.
- Jump to definition.
- Autocomplete.
- Find references.
- Rename.
- Inlay Hints.
- Signature help.
- Code lenses.
- Snippets to ease a few syntaxes:
- `external` features such as `@bs.module` and `@bs.val`
- `try`, `for`, etc.
- Folding, and [custom folding](https://code.visualstudio.com/docs/editor/codebasics#_folding) through `//#region` and `//#endregion`.
## 📥 Installation
Launch VS Code Quick Open (`Ctrl+P`), paste the following command, and press enter.
```
ext install chenglou92.rescript-vscode
```
The plugin activates on `.res` and `.resi` files. If you've already got Reason-Language-Server installed, it's possible that the latter took precedence over this one. Make sure you're using this plugin ("ReScript syntax") rather than Reason-Language-Server ("BuckleScript syntax").
### Pre-release channel
There is a pre-release channel available. It is intended for testing new and therefore possibly unstable features. You can activate it by clicking on the "Switch to Pre-Release Version" button on the `rescript-vscode` extension page in VSCode. From this point on, pre-release versions will always have an odd version minor (1.5.x, 1.7.x, 2.1.x, etc.) while stable releases have even version minor numbers (1.4.x, 1.6.x, 2.0.0, etc.).
Even if the pre-release channel seems too experimental to you, we still suggest you to give it a try and submit any issues that you run into. In the long run it will give us a better editor experience overall.
## 📦 Commands
| Command | Description |
| ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ReScript: Create an interface file for this implementation file | Creates an interface file (`.resi`) for the current `.res` file, automatically filling in all types and values in the current file. |
| ReScript: Open the compiled JS file for this implementation file | Opens the compiled JS file for the current ReScript file. |
| ReScript: Switch implementation/interface | Switches between the implementation and interface file. If you're in a `.res` file, the command will open the corresponding `.resi` file (if it exists), and if you're in a `.resi` file the command will open the corresponding `.res` file. This can also be triggered with the keybinding `Alt+O`. |
| ReScript: Start Code Analyzer | This will start code analysis in the ReScript project of the file you run the command from. |
| ReScript: Paste as ReScript JSON.t | Converts JSON from the clipboard and pastes it as ReScript `JSON.t` format. Automatically handles indentation based on cursor position.<br><br> |
| ReScript: Paste as ReScript JSX | Converts vanilla JSX from the clipboard and pastes it as ReScript JSX format. Automatically handles indentation based on cursor position. |
## 🔨 Settings
You'll find all ReScript specific settings under the scope `rescript.settings`.
| Setting | Description |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Prompt to Start Build | If there's no ReScript build running already in the opened project, the extension will prompt you and ask if you want to start a build automatically. You can turn off this automatic prompt via the setting `rescript.settings.askToStartBuild`. |
| ReScript Binary Path | The extension will look for the existence of a `node_modules/.bin/rescript` file and use its directory as the `binaryPath`. If it does not find it at the project root (which is where the nearest `rescript.json` resides), it goes up folders in the filesystem recursively until it either finds it (often the case in monorepos) or hits the top level. To override this lookup process, the path can be configured explicitly using the setting `rescript.settings.binaryPath` |
| ReScript Platform Path | The extension will look for the existence of a `node_modules/rescript` directory and use the subdirectory corresponding to the current platform as the `platformPath`. If it does not find it at the project root (which is where the nearest `rescript.json` resides), it goes up folders in the filesystem recursively until it either finds it (often the case in monorepos) or hits the top level. To override this lookup process, the path can be configured explicitly using the setting `rescript.settings.platformPath` |
| ReScript Runtime Path | The extension will look for the existence of a `node_modules/@rescript/runtime` directory (ReScript v12 beta 11+). To override this lookup process, the path can be configured explicitly using the setting `rescript.settings.runtimePath`. |
| Inlay Hints (experimental) | This allows an editor to place annotations inline with text to display type hints. Enable using `rescript.settings.inlayHints.enable: true` |
| Code Lens (experimental) | This tells the editor to add code lenses to function definitions, showing its full type above the definition. Enable using `rescript.settings.codeLens: true` |
| Signature Help | This tells the editor to show signature help when you're writing function calls. Enable using `rescript.settings.signatureHelp.enabled: true` |
| Compile Status Indicator | Shows compile status in the status bar (Compiling, Errors, Warnings, Success). Toggle via `rescript.settings.compileStatus.enable`. Clicking in Error/Warning modes focuses the Problems view. |
**Default settings:**
```jsonc
// Whether you want the extension to prompt for autostarting a ReScript build if a project is opened with no build running
"rescript.settings.askToStartBuild": true,
// Path to the directory where cross-platform ReScript binaries are. You can use it if you haven't or don't want to use the installed ReScript from node_modules in your project.
"rescript.settings.binaryPath": null
// Path to the directory where platform-specific ReScript binaries are. You can use it if you haven't or don't want to use the installed ReScript from node_modules in your project.
"rescript.settings.platformPath": null
// Enable (experimental) inlay hints.
"rescript.settings.inlayHints.enable": true
// Maximum length of character for inlay hints. Set to null to have an unlimited length. Inlay hints that exceed the maximum length will not be shown
"rescript.settings.inlayHints.maxLength": 25
// Enable (experimental) code lens for function definitions.
"rescript.settings.codeLens": true
// Show compile status in the status bar (compiling/errors/warnings/success)
"rescript.settings.compileStatus.enable": true
```
## 🚀 Code Analyzer
The Code Analyzer is a mode in the extension that runs additional code analysis in your project. The analysis helps you find dead code at a granular level, find unhandled exceptions, and more.
> The Code Analyzer uses [reanalyze](https://github.com/rescript-association/reanalyze), which is embedded in the extension, so you don't need to install anything extra to run it.
### Configuring the Code Analyzer
You'll need to configure what code analysis you want to run, and what (if any) directories you want to ignore. Configuration is done via adding `reanalyze` in `rescript.json`. You'll get autocomplete for what configuration options are valid. You can also read [all about configuring `reanalyze` here](https://github.com/rescript-association/reanalyze#configuration-via-bsconfigjson).
### Usage
Open the command palette and run `ReScript: Start Code Analyzer`. This will start code analysis in the ReScript project of the file you run the command from.
Dead code is highlighted in the editor, and code actions for suppressing dead code warnings are available in most cases.
When done, stop the code analysis mode by clicking the `Stop Code Analyzer` button in the editor status bar. This will clear all reported analysis warnings.
### Caveats
Currently does not work for full monorepo dead code analysis (although it should work for each monorepo package individually).
## 🪄 Tips & Tricks
### Hide generated files
You can configure VSCode to collapse the JavaScript files ReScript generates under its source ReScript file. This will "hide" the generated files in the VSCode file explorer, but still leaving them accessible by expanding the source ReScript file they belong to.
Open your VSCode settings and type:
```jsonc
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.res": "${capture}.mjs, ${capture}.js, ${capture}.cmi, ${capture}.cmt, ${capture}.cmj",
"*.resi": "${capture}.res"
},
```
This nests implementations under interfaces if they're present and nests all generated files under the main ReScript file. Adapt and tweak to your liking.
A screenshot of the result:

## 📰 Changelog
See [CHANGELOG](CHANGELOG.md)
## 👏 How to Contribute
Read our [Contributing Guide](CONTRIBUTING.md)
## 📄 License
See the [LICENSE](./LICENSE.txt) file for details.
================================================
FILE: analysis/Makefile
================================================
SHELL = /bin/bash
build-tests:
make -C tests build
build-tests-generic-jsx-transform:
make -C tests-generic-jsx-transform build
build-tests-incremental-typechecking:
make -C tests-incremental-typechecking build
build-reanalyze:
make -C reanalyze build
build: build-reanalyze build-tests build-tests-generic-jsx-transform build-tests-incremental-typechecking
dce: build-analysis-binary
opam exec reanalyze.exe -- -dce-cmt _build -suppress vendor
test-analysis-binary:
make -C tests test
make -C tests-generic-jsx-transform test
make -C tests-incremental-typechecking test
test-reanalyze:
make -C reanalyze test
test: test-analysis-binary test-reanalyze
clean:
make -C tests clean
make -C tests-generic-jsx-transform clean
make -C tests-incremental-typechecking clean
make -C reanalyze clean
.PHONY: build-reanalyze build-tests dce clean test
================================================
FILE: analysis/README.md
================================================
# Analysis Library and Binary
This subfolder builds a private command line binary used by the plugin to power a few functionalities such as jump to definition, hover and autocomplete.
The binary reads the `.cmt` and `.cmti` files and analyses them.
For installation & build instructions, see the main CONTRIBUTING.md.
## Overview
See main CONTRIBUTING.md's repo structure. Additionally, `examples/` is a convenience debugging repo. Check out `test.sh` (invoked through `make test`) to see the snapshots testing workflow stored in `tests/`.
## Usage
At root:
```sh
./rescript-editor-analysis.exe --help
# or
dune exec -- rescript-editor-analysis --help
```
## History
This project is based on a fork of [Reason Language Server](https://github.com/jaredly/reason-language-server).
================================================
FILE: analysis/bin/dune
================================================
(env
(static
(flags
(:standard -ccopt -static))))
(executable
(public_name rescript-editor-analysis)
(package analysis)
(modes byte exe)
(name main)
(libraries analysis))
================================================
FILE: analysis/bin/main.ml
================================================
open Analysis
let help =
{|
**Private CLI For rescript-vscode usage only**
API examples:
./rescript-editor-analysis.exe completion src/MyFile.res 0 4 currentContent.res true
./rescript-editor-analysis.exe definition src/MyFile.res 9 3
./rescript-editor-analysis.exe typeDefinition src/MyFile.res 9 3
./rescript-editor-analysis.exe documentSymbol src/Foo.res
./rescript-editor-analysis.exe hover src/MyFile.res 10 2 true
./rescript-editor-analysis.exe references src/MyFile.res 10 2
./rescript-editor-analysis.exe rename src/MyFile.res 10 2 foo
./rescript-editor-analysis.exe diagnosticSyntax src/MyFile.res
./rescript-editor-analysis.exe inlayHint src/MyFile.res 0 3 25
./rescript-editor-analysis.exe codeLens src/MyFile.res
Dev-time examples:
./rescript-editor-analysis.exe dump src/MyFile.res src/MyFile2.res
./rescript-editor-analysis.exe test src/MyFile.res
Note: positions are zero-indexed (start at 0 0), following LSP.
https://microsoft.github.io/language-server-protocol/specification#position
Options:
completion: compute autocomplete for MyFile.res at line 0 and column 4,
where MyFile.res is being edited and the editor content is in file current.res.
./rescript-editor-analysis.exe completion src/MyFile.res 0 4 current.res
definition: get definition for item in MyFile.res at line 10 column 2:
./rescript-editor-analysis.exe definition src/MyFile.res 10 2
typeDefinition: get type definition for item in MyFile.res at line 10 column 2:
./rescript-editor-analysis.exe typeDefinition src/MyFile.res 10 2
documentSymbol: get all symbols declared in MyFile.res
./rescript-editor-analysis.exe documentSymbol src/MyFile.res
hover: get inferred type for MyFile.res at line 10 column 2 (supporting markdown links):
./rescript-editor-analysis.exe hover src/MyFile.res 10 2 true
references: get all references to item in MyFile.res at line 10 column 2:
./rescript-editor-analysis.exe references src/MyFile.res 10 2
rename: rename all appearances of item in MyFile.res at line 10 column 2 with foo:
./rescript-editor-analysis.exe rename src/MyFile.res 10 2 foo
semanticTokens: return token semantic highlighting info for MyFile.res
./rescript-editor-analysis.exe semanticTokens src/MyFile.res
createInterface: print to stdout the interface file for src/MyFile.res
./rescript-editor-analysis.exe createInterface src/MyFile.res lib/bs/src/MyFile.cmi
format: print to stdout the formatted version of the provided file
./rescript-editor-analysis.exe format src/MyFile.res
diagnosticSyntax: print to stdout diagnostic for syntax
./rescript-editor-analysis.exe diagnosticSyntax src/MyFile.res
inlayHint: get all inlay Hint between line 0 and 3 declared in MyFile.res. Last argument is maximum of character length for inlay hints
./rescript-editor-analysis.exe inlayHint src/MyFile.res 0 3 25
codeLens: get all code lens entries for file src/MyFile.res
./rescript-editor-analysis.exe codeLens src/MyFile.res
signatureHelp: get signature help if available for position at line 10 column 2 in src/MyFile.res
./rescript-editor-analysis.exe signatureHelp src/MyFile.res 10 2
test: run tests specified by special comments in file src/MyFile.res
./rescript-editor-analysis.exe test src/src/MyFile.res
|}
let main () =
let args = Array.to_list Sys.argv in
let debugLevel, args =
match args with
| _ :: "debug-dump" :: logLevel :: rest ->
( (match logLevel with
| "verbose" -> Debug.Verbose
| "regular" -> Regular
| _ -> Off),
"dummy" :: rest )
| args -> (Off, args)
in
Debug.debugLevel := debugLevel;
let debug = debugLevel <> Debug.Off in
let printHeaderInfo path line col =
if debug then
Printf.printf "Debug level: %s\n%s:%s-%s\n\n"
(match debugLevel with
| Debug.Verbose -> "verbose"
| Regular -> "regular"
| Off -> "off")
path line col
in
match args with
| [_; "cache-project"; rootPath] -> (
Cfg.readProjectConfigCache := false;
let uri = Uri.fromPath rootPath in
match Packages.getPackage ~uri with
| Some package -> Cache.cacheProject package
| None -> print_endline "\"ERR\"")
| [_; "cache-delete"; rootPath] -> (
Cfg.readProjectConfigCache := false;
let uri = Uri.fromPath rootPath in
match Packages.findRoot ~uri (Hashtbl.create 0) with
| Some (`Bs rootPath) -> (
match BuildSystem.getLibBs rootPath with
| None -> print_endline "\"ERR\""
| Some libBs ->
Cache.deleteCache (Cache.targetFileFromLibBs libBs);
print_endline "\"OK\"")
| _ -> print_endline "\"ERR: Did not find root \"")
| [_; "completion"; path; line; col; currentFile] ->
printHeaderInfo path line col;
Commands.completion ~debug ~path
~pos:(int_of_string line, int_of_string col)
~currentFile
| [_; "completionResolve"; path; modulePath] ->
Commands.completionResolve ~path ~modulePath
| [_; "definition"; path; line; col] ->
Commands.definition ~path
~pos:(int_of_string line, int_of_string col)
~debug
| [_; "typeDefinition"; path; line; col] ->
Commands.typeDefinition ~path
~pos:(int_of_string line, int_of_string col)
~debug
| [_; "documentSymbol"; path] -> DocumentSymbol.command ~path
| [_; "hover"; path; line; col; currentFile; supportsMarkdownLinks] ->
Commands.hover ~path
~pos:(int_of_string line, int_of_string col)
~currentFile ~debug
~supportsMarkdownLinks:
(match supportsMarkdownLinks with
| "true" -> true
| _ -> false)
| [
_; "signatureHelp"; path; line; col; currentFile; allowForConstructorPayloads;
] ->
Commands.signatureHelp ~path
~pos:(int_of_string line, int_of_string col)
~currentFile ~debug
~allowForConstructorPayloads:
(match allowForConstructorPayloads with
| "true" -> true
| _ -> false)
| [_; "inlayHint"; path; line_start; line_end; maxLength] ->
Commands.inlayhint ~path
~pos:(int_of_string line_start, int_of_string line_end)
~maxLength ~debug
| [_; "codeLens"; path] -> Commands.codeLens ~path ~debug
| [_; "codeAction"; path; startLine; startCol; endLine; endCol; currentFile]
->
Commands.codeAction ~path
~startPos:(int_of_string startLine, int_of_string startCol)
~endPos:(int_of_string endLine, int_of_string endCol)
~currentFile ~debug
| [_; "codemod"; path; line; col; typ; hint] ->
let typ =
match typ with
| "add-missing-cases" -> Codemod.AddMissingCases
| _ -> raise (Failure "unsupported type")
in
let res =
Codemod.transform ~path
~pos:(int_of_string line, int_of_string col)
~debug ~typ ~hint
|> Json.escape
in
Printf.printf "\"%s\"" res
| [_; "diagnosticSyntax"; path] -> Commands.diagnosticSyntax ~path
| _ :: "reanalyze" :: _ ->
let len = Array.length Sys.argv in
for i = 1 to len - 2 do
Sys.argv.(i) <- Sys.argv.(i + 1)
done;
Sys.argv.(len - 1) <- "";
Reanalyze.cli ()
| [_; "references"; path; line; col] ->
Commands.references ~path
~pos:(int_of_string line, int_of_string col)
~debug
| [_; "rename"; path; line; col; newName] ->
Commands.rename ~path
~pos:(int_of_string line, int_of_string col)
~newName ~debug
| [_; "semanticTokens"; currentFile] ->
SemanticTokens.semanticTokens ~currentFile
| [_; "createInterface"; path; cmiFile] ->
Printf.printf "\"%s\""
(Json.escape (CreateInterface.command ~path ~cmiFile))
| [_; "format"; path] ->
Printf.printf "\"%s\"" (Json.escape (Commands.format ~path))
| [_; "test"; path] -> Commands.test ~path
| args when List.mem "-h" args || List.mem "--help" args -> prerr_endline help
| _ ->
prerr_endline help;
exit 1
;;
main ()
================================================
FILE: analysis/dune
================================================
(dirs bin src reanalyze vendor)
(env
(dev
(env-vars
(CPPO_FLAGS -U=RELEASE)))
(release
(env-vars
(CPPO_FLAGS -D=RELEASE))
(ocamlopt_flags
(:standard -O3 -unbox-closures)))
(static
(env-vars
(CPPO_FLAGS -D=RELEASE))
(ocamlopt_flags
(:standard -O3 -unbox-closures))))
================================================
FILE: analysis/examples/example-project/.gitignore
================================================
lib
.merlin
================================================
FILE: analysis/examples/example-project/.vscode/settings.json
================================================
{
"rescript.settings.logLevel": "log"
}
================================================
FILE: analysis/examples/example-project/package.json
================================================
{
"name": "tryit",
"dependencies": {
"@rescript/react": "^0.14.0",
"rescript": "12.1.0"
},
"scripts": {
"build": "rescript",
"start": "rescript build -w",
"clean": "rescript clean",
"format": "rescript format"
}
}
================================================
FILE: analysis/examples/example-project/rescript.json
================================================
{
"name": "tryit",
"sources": "src",
"compiler-flags": [],
"warnings": {
"number": "-32-26-27-33"
},
"dependencies": [
"@rescript/react"
],
"jsx": {
"version": 4
},
"namespace": "my-namespace",
"package-specs": {
"module": "esmodule",
"in-source": true,
"suffix": ".res.js"
}
}
================================================
FILE: analysis/examples/example-project/src/Embeded.md
================================================
# Markdown Embedded Fenced Code Regression Test
```re
module Something = {
open Other;
let m = {name: "Me", age: 0};
let animal = Things(10);
let other = Things(2);
let me: animals = People("Hie");
let x = something + 10;
let r = m.name;
let awesome = 20;
if (true) {
()
}
};
```
```reason
module Something = {
open Other;
let m = {name: "Me", age: 0};
let animal = Things(10);
let other = Things(2);
let me: animals = People("Hie");
let x = something + 10;
let r = m.name;
let awesome = 20;
if (true) {
()
}
};
```
```reasonml
module Something = {
open Other;
let m = {name: "Me", age: 0};
let animal = Things(10);
let other = Things(2);
let me: animals = People("Hie");
let x = something + 10;
let r = m.name;
let awesome = 20;
if (true) {
()
}
};
```
================================================
FILE: analysis/examples/example-project/src/Hello.res
================================================
let someLongName = 10
let otherLongName = "string"
let x = {"a": 3}
let r = Other.something
let l = More.inner + More.n + Other.inner
let n = More.n
let _ = More.party
let _ = string_of_bool
/* let m = {More.a: 2, b: 32.}; */
module Something = {
open Other
let m = {name: "Me", age: 0}
let animal = Things(10)
let other = Things(2)
let me: animals = People("Hie")
let x = something + 10
let r = m.name
let awesome = 20
if true {
()
}
}
open! Something
let y = x + 10
switch me {
| Things(n) => ()
| _ => ()
}
let z = x * x
let aThing = 10 + Other.something
@ocaml.doc(" Some docs about this **awesome** thing. ")
let awesome =
100 + m.age
let thing = "thing"
let transform = (x, y) => x ++ Float.toString(y)
let z = transform("hello ", 5.)
let zzz = 1
let more = 20
@ocaml.doc(" Something here ")
let added =
10 + awesome
open Other
@ocaml.doc(" Some more documentation about this ")
let awesome = x => x + 2
let a = list{"hello", "my fine" ++ "folks", "in boonville"}
let div = (~x, ~y, ~children, ()) => 10
let m = <div x="10" y="20" />
let something = animal =>
switch animal {
| blank => ()
}
something(animal)
let someFunction = (memorableName, {contents}) => {
let innerMemorable = 20
memorableName + innerMemorable
}
/* let awesome = 10000; */
/* let awesome = 111; */
let z = 10
let z = later
let m = Other.later
for _index in 0 to 10 {
Console.log("hellO")
}
module OneOneOneOne = {
module TwoTwoTwoTwo = {
let xxxxxxxxxx = 10
}
}
let r = OneOneOneOne.TwoTwoTwoTwo.xxxxxxxxxx
type awesome = {
one: string,
two: float,
}
open OneOneOneOne.TwoTwoTwoTwo
include OneOneOneOne.TwoTwoTwoTwo
include More
let _ = Other.oo.person.name
type lots =
| Parties
| Plutocrats(int, float)
| Possums
| Oppossums
let y = Some(10 + awesome(3))
let z = {contents: 30}
let party = {one: "one", two: 2.}
let {one, two} = party
let thing = () => 34 + 43
type more = awesome
let {contents} = z
switch y {
| Some(u) => ()
| None => ()
}
/* let x = [%raw " hello"]; */
let awesome = "hello"
type shortReference = (string, list<string>, string)
type reference = {
uri: string,
moduleName: string,
modulePath: list<string>,
name: string,
}
type typeSource =
| Builtin(string)
| Public(reference)
| NotFound
type lockfile = {
version: int,
pastVersions: Belt.HashMap.Int.t<list<(shortReference, int)>>,
current: list<(shortReference, int)>,
}
================================================
FILE: analysis/examples/example-project/src/Hello.res.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as More$MyNamespace from "./More.res.js";
import * as Other$MyNamespace from "./Other.res.js";
import * as JsxRuntime from "react/jsx-runtime";
let x = {
a: 3
};
let l = (More$MyNamespace.inner + More$MyNamespace.n | 0) + Other$MyNamespace.inner | 0;
let me = {
TAG: "People",
_0: "Hie"
};
let x$1 = Other$MyNamespace.something + 10 | 0;
let Something_m = {
name: "Me",
age: 0
};
let Something_animal = {
TAG: "Things",
_0: 10
};
let Something_other = {
TAG: "Things",
_0: 2
};
let Something = {
m: Something_m,
animal: Something_animal,
other: Something_other,
me: me,
x: x$1,
r: "Me",
awesome: 20
};
let aThing = 10 + Other$MyNamespace.something | 0;
function transform(x, y) {
return x + y.toString();
}
transform("hello ", 5);
let added = 110;
let a_1 = {
hd: "my finefolks",
tl: {
hd: "in boonville",
tl: /* [] */0
}
};
let a = {
hd: "hello",
tl: a_1
};
function div(x, y, children, param) {
return 10;
}
JsxRuntime.jsx("div", {
x: "10",
y: "20"
});
function something(animal) {
}
function someFunction(memorableName, param) {
return memorableName + 20 | 0;
}
for (let _index = 0; _index <= 10; ++_index) {
console.log("hellO");
}
let TwoTwoTwoTwo = {
xxxxxxxxxx: 10
};
let OneOneOneOne = {
TwoTwoTwoTwo: TwoTwoTwoTwo
};
let y = 15;
let z = {
contents: 30
};
function thing() {
return 77;
}
let contents = z.contents;
let someLongName = 10;
let otherLongName = "string";
let zzz = 1;
let more = 20;
let m = Other$MyNamespace.later;
let r = 10;
let xxxxxxxxxx = 10;
let contnets = More$MyNamespace.contnets;
let inner = More$MyNamespace.inner;
let n = More$MyNamespace.n;
let party = {
one: "one",
two: 2
};
let one = "one";
let two = 2;
let awesome = "hello";
export {
someLongName,
otherLongName,
x,
l,
Something,
aThing,
transform,
zzz,
more,
added,
a,
div,
something,
someFunction,
m,
OneOneOneOne,
r,
xxxxxxxxxx,
contnets,
inner,
n,
y,
z,
party,
one,
two,
thing,
contents,
awesome,
}
/* Not a pure module */
================================================
FILE: analysis/examples/example-project/src/Json.res
================================================
@@ocaml.doc(" # Json parser
*
* Works with bucklescript and bsb-native
*
* ## Basics
*
* ```
* open Json.Infix; /* for the nice infix operators */
* let raw = {|{\"hello\": \"folks\"}|};
* let who = Json.parse(raw) |> Json.get(\"hello\") |?> Json.string;
* Js.log(who);
* ```
*
* ## Parse & stringify
*
* @doc parse, stringify
*
* ## Accessing descendents
*
* @doc get, nth, getPath
*
* ## Coercing to types
*
* @doc string, number, array, obj, bool, null
*
* ## The JSON type
*
* @doc t
*
* ## Infix operators for easier working
*
* @doc Infix
")
external parseFloat: string => float = "parseFloat"
type rec t =
| String(string)
| Number(float)
| Array(list<t>)
| Object(list<(string, t)>)
| True
| False
| Null
let string_of_number = f => {
let s = Float.toString(f)
if String.get(s, String.length(s) - 1) == Some(".") {
String.slice(s, ~start=0, ~end=String.length(s) - 1)
} else {
s
}
}
@ocaml.doc("
* This module is provided for easier working with optional values.
")
module Infix = {
@ocaml.doc(" The \"force unwrap\" operator
*
* If you're sure there's a value, you can force it.
* ```
* open Json.Infix;
* let x: int = Some(10) |! \"Expected this to be present\";
* Js.log(x);
* ```
*
* But you gotta be sure, otherwise it will throw.
* ```reason;raises
* open Json.Infix;
* let x: int = None |! \"This will throw\";
* ```
")
let \"|!" = (o, d) =>
switch o {
| None => failwith(d)
| Some(v) => v
}
@ocaml.doc(" The \"upwrap with default\" operator
* ```
* open Json.Infix;
* let x: int = Some(10) |? 4;
* let y: int = None |? 5;
* Js.log2(x, y);
* ```
")
let \"|?" = (o, d) =>
switch o {
| None => d
| Some(v) => v
}
@ocaml.doc(" The \"transform contents into new optional\" operator
* ```
* open Json.Infix;
* let maybeInc = x => x > 5 ? Some(x + 1) : None;
* let x: option(int) = Some(14) |?> maybeInc;
* let y: option(int) = None |?> maybeInc;
* ```
")
let \"|?>" = (o, fn) =>
switch o {
| None => None
| Some(v) => fn(v)
}
@ocaml.doc(" The \"transform contents into new value & then re-wrap\" operator
* ```
* open Json.Infix;
* let inc = x => x + 1;
* let x: option(int) = Some(7) |?>> inc;
* let y: option(int) = None |?>> inc;
* Js.log2(x, y);
* ```
")
let \"|?>>" = (o, fn) =>
switch o {
| None => None
| Some(v) => Some(fn(v))
}
@ocaml.doc(" \"handle the value if present, otherwise here's the default\"
*
* It's called fold because that's what people call it :?. It's the same as \"transform contents to new value\" + \"unwrap with default\".
*
* ```
* open Json.Infix;
* let inc = x => x + 1;
* let x: int = fold(Some(4), 10, inc);
* let y: int = fold(None, 2, inc);
* Js.log2(x, y);
* ```
")
let fold = (o, d, f) =>
switch o {
| None => d
| Some(v) => f(v)
}
}
let escape = text => {
let ln = String.length(text)
let rec loop = (i, acc) =>
if i < ln {
let next = switch String.get(text, i) {
| Some("\x0c") => acc ++ "\\f"
| Some("\\") => acc ++ "\\\\"
| Some("\"") => acc ++ "\\\""
| Some("\n") => acc ++ "\\n"
| Some("\b") => acc ++ "\\b"
| Some("\r") => acc ++ "\\r"
| Some("\t") => acc ++ "\\t"
| Some(c) => acc ++ c
| None => acc
}
loop(i + 1, next)
} else {
acc
}
loop(0, "")
}
@ocaml.doc(" ```
* let text = {|{\"hello\": \"folks\", \"aa\": [2, 3, \"four\"]}|};
* let result = Json.stringify(Json.parse(text));
* Js.log(result);
* assert(text == result);
* ```
")
let rec stringify = t =>
switch t {
| String(value) => "\"" ++ (escape(value) ++ "\"")
| Number(num) => string_of_number(num)
| Array(items) => {
let rec join = (items, sep) =>
switch items {
| list{} => ""
| list{x} => x
| list{x, ...rest} => x ++ sep ++ join(rest, sep)
}
let parts = List.map(items, stringify)
"[" ++ join(parts, ", ") ++ "]"
}
| Object(items) => {
let rec join = (items, sep) =>
switch items {
| list{} => ""
| list{x} => x
| list{x, ...rest} => x ++ sep ++ join(rest, sep)
}
let parts = List.map(items, ((k, v)) => "\"" ++ (escape(k) ++ ("\": " ++ stringify(v))))
"{" ++ join(parts, ", ") ++ "}"
}
| True => "true"
| False => "false"
| Null => "null"
}
let white = n => {
let rec loop = (i, acc) =>
if i < n {
loop(i + 1, acc ++ " ")
} else {
acc
}
loop(0, "")
}
let rec stringifyPretty = (~indent=0, t) => {
let rec join = (items, sep) =>
switch items {
| list{} => ""
| list{x} => x
| list{x, ...rest} => x ++ sep ++ join(rest, sep)
}
switch t {
| String(value) => "\"" ++ (escape(value) ++ "\"")
| Number(num) => string_of_number(num)
| Array(list{}) => "[]"
| Array(items) => {
let parts = List.map(items, item => stringifyPretty(~indent=indent + 2, item))
"[\n" ++
white(indent + 2) ++
join(parts, ",\n" ++ white(indent + 2)) ++
"\n" ++
white(indent) ++ "]"
}
| Object(list{}) => "{}"
| Object(items) => {
let parts = List.map(items, ((k, v)) =>
"\"" ++ (escape(k) ++ ("\": " ++ stringifyPretty(~indent=indent + 2, v)))
)
"{\n" ++
white(indent + 2) ++
join(parts, ",\n" ++ white(indent + 2)) ++
"\n" ++
white(indent) ++ "}"
}
| True => "true"
| False => "false"
| Null => "null"
}
}
let unwrap = (message, t) =>
switch t {
| Some(v) => v
| None => failwith(message)
}
@nodoc
module Parser = {
let split_by = (~keep_empty=false, is_delim, str) => {
let len = String.length(str)
let rec loop = (acc, last_pos, pos) =>
if pos == -1 {
if last_pos == 0 && !keep_empty {
acc
} else {
list{String.slice(str, ~start=0, ~end=last_pos), ...acc}
}
} else if is_delim(String.get(str, pos)) {
let new_len = last_pos - pos - 1
if new_len != 0 || keep_empty {
let v = String.slice(str, ~start=pos + 1, ~end=pos + 1 + new_len)
loop(list{v, ...acc}, pos, pos - 1)
} else {
loop(acc, pos, pos - 1)
}
} else {
loop(acc, last_pos, pos - 1)
}
loop(list{}, len, len - 1)
}
let fail = (text, pos, message) => {
let pre = String.slice(text, ~start=0, ~end=pos)
let lines = split_by(c => c == Some("\n"), pre)
let count = List.length(lines)
let last = count > 0 ? List.getOrThrow(lines, count - 1) : ""
let col = String.length(last) + 1
let line = List.length(lines)
let string =
"Error \"" ++
message ++
"\" at " ++
Int.toString(line) ++
":" ++
Int.toString(col) ++
" -> " ++
last ++ "\n"
failwith(string)
}
let rec skipToNewline = (text, pos) =>
if pos >= String.length(text) {
pos
} else if String.get(text, pos) == Some("\n") {
pos + 1
} else {
skipToNewline(text, pos + 1)
}
let stringTail = text => {
let len = String.length(text)
if len > 1 {
String.slice(text, ~start=1, ~end=len)
} else {
""
}
}
let rec skipToCloseMultilineComment = (text, pos) =>
if pos + 1 >= String.length(text) {
failwith("Unterminated comment")
} else if String.get(text, pos) == Some("*") && String.get(text, pos + 1) == Some("/") {
pos + 2
} else {
skipToCloseMultilineComment(text, pos + 1)
}
let rec skipWhite = (text, pos) =>
if (
pos < String.length(text) &&
(String.get(text, pos) == Some(" ") ||
(String.get(text, pos) == Some("\t") ||
(String.get(text, pos) == Some("\n") || String.get(text, pos) == Some("\r"))))
) {
skipWhite(text, pos + 1)
} else {
pos
}
let parseString = (text, pos) => {
let ln = String.length(text)
let rec loop = (i, acc) =>
i >= ln
? fail(text, i, "Unterminated string")
: switch String.get(text, i) {
| Some("\"") => (i + 1, acc)
| Some("\\") =>
i + 1 >= ln
? fail(text, i, "Unterminated string")
: switch String.get(text, i + 1) {
| Some("/") => loop(i + 2, acc ++ "/")
| Some("f") => loop(i + 2, acc ++ "\x0c")
| _ =>
let escaped = String.slice(text, ~start=i, ~end=i + 2)
loop(i + 2, acc ++ escaped)
}
| Some(c) => loop(i + 1, acc ++ c)
| None => (i, acc)
}
let (final, result) = loop(pos, "")
(result, final)
}
let parseDigits = (text, pos) => {
let len = String.length(text)
let rec loop = i =>
if i >= len {
i
} else {
switch String.get(text, i) {
| Some("0")
| Some("1")
| Some("2")
| Some("3")
| Some("4")
| Some("5")
| Some("6")
| Some("7")
| Some("8")
| Some("9") =>
loop(i + 1)
| _ => i
}
}
loop(pos + 1)
}
let parseWithDecimal = (text, pos) => {
let pos = parseDigits(text, pos)
if pos < String.length(text) && String.get(text, pos) == Some(".") {
let pos = parseDigits(text, pos + 1)
pos
} else {
pos
}
}
let parseNumber = (text, pos) => {
let pos = parseWithDecimal(text, pos)
let ln = String.length(text)
if pos < ln - 1 && (String.get(text, pos) == Some("E") || String.get(text, pos) == Some("e")) {
let pos = switch String.get(text, pos + 1) {
| Some("-")
| Some("+") =>
pos + 2
| _ => pos + 1
}
parseDigits(text, pos)
} else {
pos
}
}
let parseNegativeNumber = (text, pos) => {
let final = if String.get(text, pos) == Some("-") {
parseNumber(text, pos + 1)
} else {
parseNumber(text, pos)
}
let numStr = String.slice(text, ~start=pos, ~end=final)
(Number(parseFloat(numStr)), final)
}
let expect = (char, text, pos, message) =>
if String.get(text, pos) != Some(char) {
fail(text, pos, "Expected: " ++ message)
} else {
pos + 1
}
let parseComment: 'a. (string, int, (string, int) => 'a) => 'a = (text, pos, next) =>
if String.get(text, pos) != Some("/") {
if String.get(text, pos) == Some("*") {
next(text, skipToCloseMultilineComment(text, pos + 1))
} else {
failwith("Invalid syntax")
}
} else {
next(text, skipToNewline(text, pos + 1))
}
let maybeSkipComment = (text, pos) =>
if pos < String.length(text) && String.get(text, pos) == Some("/") {
if pos + 1 < String.length(text) && String.get(text, pos + 1) == Some("/") {
skipToNewline(text, pos + 1)
} else if pos + 1 < String.length(text) && String.get(text, pos + 1) == Some("*") {
skipToCloseMultilineComment(text, pos + 1)
} else {
fail(text, pos, "Invalid synatx")
}
} else {
pos
}
let rec skip = (text, pos) =>
if pos == String.length(text) {
pos
} else {
let n = maybeSkipComment(text, skipWhite(text, pos))
if n > pos {
skip(text, n)
} else {
n
}
}
let rec parse = (text, pos) =>
if pos >= String.length(text) {
fail(text, pos, "Reached end of file without being done parsing")
} else {
switch String.get(text, pos) {
| Some("/") => parseComment(text, pos + 1, parse)
| Some("[") => parseArray(text, pos + 1)
| Some("{") => parseObject(text, pos + 1)
| Some("n") =>
if String.slice(text, ~start=pos, ~end=pos + 4) == "null" {
(Null, pos + 4)
} else {
fail(text, pos, "unexpected character")
}
| Some("t") =>
if String.slice(text, ~start=pos, ~end=pos + 4) == "true" {
(True, pos + 4)
} else {
fail(text, pos, "unexpected character")
}
| Some("f") =>
if String.slice(text, ~start=pos, ~end=pos + 5) == "false" {
(False, pos + 5)
} else {
fail(text, pos, "unexpected character")
}
| Some("\n")
| Some("\t")
| Some(" ")
| Some("\r") =>
parse(text, skipWhite(text, pos))
| Some("\"") =>
let (s, pos) = parseString(text, pos + 1)
(String(s), pos)
| Some("-")
| Some("0")
| Some("1")
| Some("2")
| Some("3")
| Some("4")
| Some("5")
| Some("6")
| Some("7")
| Some("8")
| Some("9") =>
parseNegativeNumber(text, pos)
| _ => fail(text, pos, "unexpected character")
}
}
and parseArrayValue = (text, pos) => {
let pos = skip(text, pos)
let (value, pos) = parse(text, pos)
let pos = skip(text, pos)
switch String.get(text, pos) {
| Some(",") =>
let pos = skip(text, pos + 1)
if String.get(text, pos) == Some("]") {
(list{value}, pos + 1)
} else {
let (rest, pos) = parseArrayValue(text, pos)
(list{value, ...rest}, pos)
}
| Some("]") => (list{value}, pos + 1)
| _ => fail(text, pos, "unexpected character")
}
}
and parseArray = (text, pos) => {
let pos = skip(text, pos)
switch String.get(text, pos) {
| Some("]") => (Array(list{}), pos + 1)
| _ =>
let (items, pos) = parseArrayValue(text, pos)
(Array(items), pos)
}
}
and parseObjectValue = (text, pos) => {
let pos = skip(text, pos)
if String.get(text, pos) != Some("\"") {
fail(text, pos, "Expected string")
} else {
let (key, pos) = parseString(text, pos + 1)
let pos = skip(text, pos)
let pos = expect(":", text, pos, "Colon")
let (value, pos) = parse(text, pos)
let pos = skip(text, pos)
switch String.get(text, pos) {
| Some(",") =>
let pos = skip(text, pos + 1)
if String.get(text, pos) == Some("}") {
(list{(key, value)}, pos + 1)
} else {
let (rest, pos) = parseObjectValue(text, pos)
(list{(key, value), ...rest}, pos)
}
| Some("}") => (list{(key, value)}, pos + 1)
| _ =>
let (rest, pos) = parseObjectValue(text, pos)
(list{(key, value), ...rest}, pos)
}
}
}
and parseObject = (text, pos) => {
let pos = skip(text, pos)
if String.get(text, pos) == Some("}") {
(Object(list{}), pos + 1)
} else {
let (pairs, pos) = parseObjectValue(text, pos)
(Object(pairs), pos)
}
}
}
@ocaml.doc(" Turns some text into a json object. throws on failure ")
let parse = text => {
let (item, pos) = Parser.parse(text, 0)
let pos = Parser.skip(text, pos)
if pos < String.length(text) {
failwith(
"Extra data after parse finished: " ++
String.slice(text, ~start=pos, ~end=String.length(text)),
)
} else {
item
}
}
/* Accessor helpers */
let bind = (v, fn) =>
switch v {
| None => None
| Some(v) => fn(v)
}
@ocaml.doc(" If `t` is an object, get the value associated with the given string key ")
let get = (key, t) =>
switch t {
| Object(items) => {
let rec find = items =>
switch items {
| list{} => None
| list{(k, v), ...rest} => k == key ? Some(v) : find(rest)
}
find(items)
}
| _ => None
}
@ocaml.doc(" If `t` is an array, get the value associated with the given index ")
let nth = (n, t) =>
switch t {
| Array(items) =>
if n < List.length(items) {
Some(List.getOrThrow(items, n))
} else {
None
}
| _ => None
}
let string = t =>
switch t {
| String(s) => Some(s)
| _ => None
}
let number = t =>
switch t {
| Number(s) => Some(s)
| _ => None
}
let array = t =>
switch t {
| Array(s) => Some(s)
| _ => None
}
let obj = t =>
switch t {
| Object(s) => Some(s)
| _ => None
}
let bool = t =>
switch t {
| True => Some(true)
| False => Some(false)
| _ => None
}
let null = t =>
switch t {
| Null => Some()
| _ => None
}
let rec parsePath = (keyList, t) =>
switch keyList {
| list{} => Some(t)
| list{head, ...rest} =>
switch get(head, t) {
| None => None
| Some(value) => parsePath(rest, value)
}
}
@ocaml.doc(" Get a deeply nested value from an object `t`.
* ```
* open Json.Infix;
* let json = Json.parse({|{\"a\": {\"b\": {\"c\": 2}}}|});
* let num = Json.getPath(\"a.b.c\", json) |?> Json.number;
* assert(num == Some(2.))
* ```
")
let getPath = (path, t) => {
let keys = Parser.split_by(c => c == Some("."), path)
parsePath(keys, t)
}
================================================
FILE: analysis/examples/example-project/src/Json.res.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as Pervasives from "@rescript/runtime/lib/es6/Pervasives.js";
import * as Stdlib_List from "@rescript/runtime/lib/es6/Stdlib_List.js";
import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
function string_of_number(f) {
let s = f.toString();
if (Primitive_object.equal(s[s.length - 1 | 0], ".")) {
return s.slice(0, s.length - 1 | 0);
} else {
return s;
}
}
function $pipe$bang(o, d) {
if (o !== undefined) {
return Primitive_option.valFromOption(o);
} else {
return Pervasives.failwith(d);
}
}
function $pipe$question(o, d) {
if (o !== undefined) {
return Primitive_option.valFromOption(o);
} else {
return d;
}
}
function $pipe$question$great(o, fn) {
if (o !== undefined) {
return fn(Primitive_option.valFromOption(o));
}
}
function $pipe$question$great$great(o, fn) {
if (o !== undefined) {
return Primitive_option.some(fn(Primitive_option.valFromOption(o)));
}
}
function fold(o, d, f) {
if (o !== undefined) {
return f(Primitive_option.valFromOption(o));
} else {
return d;
}
}
let Infix = {
$pipe$bang: $pipe$bang,
$pipe$question: $pipe$question,
$pipe$question$great: $pipe$question$great,
$pipe$question$great$great: $pipe$question$great$great,
fold: fold
};
function escape(text) {
let ln = text.length;
let _i = 0;
let _acc = "";
while (true) {
let acc = _acc;
let i = _i;
if (i >= ln) {
return acc;
}
let c = text[i];
let next;
if (c !== undefined) {
switch (c) {
case "\"" :
next = acc + "\\\"";
break;
case "\\" :
next = acc + "\\\\";
break;
case "\b" :
next = acc + "\\b";
break;
case "\n" :
next = acc + "\\n";
break;
case "\r" :
next = acc + "\\r";
break;
case "\t" :
next = acc + "\\t";
break;
case "\x0c" :
next = acc + "\\f";
break;
default:
next = acc + c;
}
} else {
next = acc;
}
_acc = next;
_i = i + 1 | 0;
continue;
};
}
function stringify(t) {
if (typeof t !== "object") {
switch (t) {
case "True" :
return "true";
case "False" :
return "false";
case "Null" :
return "null";
}
} else {
switch (t.TAG) {
case "String" :
return "\"" + (escape(t._0) + "\"");
case "Number" :
return string_of_number(t._0);
case "Array" :
let join = (items, sep) => {
if (items === 0) {
return "";
}
let rest = items.tl;
let x = items.hd;
if (rest !== 0) {
return x + sep + join(rest, sep);
} else {
return x;
}
};
let parts = Stdlib_List.map(t._0, stringify);
return "[" + join(parts, ", ") + "]";
case "Object" :
let join$1 = (items, sep) => {
if (items === 0) {
return "";
}
let rest = items.tl;
let x = items.hd;
if (rest !== 0) {
return x + sep + join$1(rest, sep);
} else {
return x;
}
};
let parts$1 = Stdlib_List.map(t._0, param => "\"" + (escape(param[0]) + ("\": " + stringify(param[1]))));
return "{" + join$1(parts$1, ", ") + "}";
}
}
}
function white(n) {
let _i = 0;
let _acc = "";
while (true) {
let acc = _acc;
let i = _i;
if (i >= n) {
return acc;
}
_acc = acc + " ";
_i = i + 1 | 0;
continue;
};
}
function stringifyPretty(indentOpt, t) {
let indent = indentOpt !== undefined ? indentOpt : 0;
let join = (items, sep) => {
if (items === 0) {
return "";
}
let rest = items.tl;
let x = items.hd;
if (rest !== 0) {
return x + sep + join(rest, sep);
} else {
return x;
}
};
if (typeof t !== "object") {
switch (t) {
case "True" :
return "true";
case "False" :
return "false";
case "Null" :
return "null";
}
} else {
switch (t.TAG) {
case "String" :
return "\"" + (escape(t._0) + "\"");
case "Number" :
return string_of_number(t._0);
case "Array" :
let items = t._0;
if (items === 0) {
return "[]";
}
let parts = Stdlib_List.map(items, item => stringifyPretty(indent + 2 | 0, item));
return "[\n" + white(indent + 2 | 0) + join(parts, ",\n" + white(indent + 2 | 0)) + "\n" + white(indent) + "]";
case "Object" :
let items$1 = t._0;
if (items$1 === 0) {
return "{}";
}
let parts$1 = Stdlib_List.map(items$1, param => "\"" + (escape(param[0]) + ("\": " + stringifyPretty(indent + 2 | 0, param[1]))));
return "{\n" + white(indent + 2 | 0) + join(parts$1, ",\n" + white(indent + 2 | 0)) + "\n" + white(indent) + "}";
}
}
}
function unwrap(message, t) {
if (t !== undefined) {
return Primitive_option.valFromOption(t);
} else {
return Pervasives.failwith(message);
}
}
function split_by(keep_emptyOpt, is_delim, str) {
let keep_empty = keep_emptyOpt !== undefined ? keep_emptyOpt : false;
let len = str.length;
let _acc = /* [] */0;
let _last_pos = len;
let _pos = len - 1 | 0;
while (true) {
let pos = _pos;
let last_pos = _last_pos;
let acc = _acc;
if (pos === -1) {
if (last_pos === 0 && !keep_empty) {
return acc;
} else {
return {
hd: str.slice(0, last_pos),
tl: acc
};
}
}
if (is_delim(str[pos])) {
let new_len = (last_pos - pos | 0) - 1 | 0;
if (new_len !== 0 || keep_empty) {
let v = str.slice(pos + 1 | 0, (pos + 1 | 0) + new_len | 0);
_pos = pos - 1 | 0;
_last_pos = pos;
_acc = {
hd: v,
tl: acc
};
continue;
}
_pos = pos - 1 | 0;
_last_pos = pos;
continue;
}
_pos = pos - 1 | 0;
continue;
};
}
function fail(text, pos, message) {
let pre = text.slice(0, pos);
let lines = split_by(undefined, c => Primitive_object.equal(c, "\n"), pre);
let count = Stdlib_List.length(lines);
let last = count > 0 ? Stdlib_List.getOrThrow(lines, count - 1 | 0) : "";
let col = last.length + 1 | 0;
let line = Stdlib_List.length(lines);
return Pervasives.failwith("Error \"" + message + "\" at " + line.toString() + ":" + col.toString() + " -> " + last + "\n");
}
function skipToNewline(text, _pos) {
while (true) {
let pos = _pos;
if (pos >= text.length) {
return pos;
}
if (Primitive_object.equal(text[pos], "\n")) {
return pos + 1 | 0;
}
_pos = pos + 1 | 0;
continue;
};
}
function stringTail(text) {
let len = text.length;
if (len > 1) {
return text.slice(1, len);
} else {
return "";
}
}
function skipToCloseMultilineComment(text, _pos) {
while (true) {
let pos = _pos;
if ((pos + 1 | 0) >= text.length) {
return Pervasives.failwith("Unterminated comment");
}
if (Primitive_object.equal(text[pos], "*") && Primitive_object.equal(text[pos + 1 | 0], "/")) {
return pos + 2 | 0;
}
_pos = pos + 1 | 0;
continue;
};
}
function skipWhite(text, _pos) {
while (true) {
let pos = _pos;
if (!(pos < text.length && (Primitive_object.equal(text[pos], " ") || Primitive_object.equal(text[pos], "\t") || Primitive_object.equal(text[pos], "\n") || Primitive_object.equal(text[pos], "\r")))) {
return pos;
}
_pos = pos + 1 | 0;
continue;
};
}
function parseString(text, pos) {
let ln = text.length;
let loop = (_i, _acc) => {
while (true) {
let acc = _acc;
let i = _i;
if (i >= ln) {
return fail(text, i, "Unterminated string");
}
let c = text[i];
if (c === undefined) {
return [
i,
acc
];
}
switch (c) {
case "\"" :
return [
i + 1 | 0,
acc
];
case "\\" :
if ((i + 1 | 0) >= ln) {
return fail(text, i, "Unterminated string");
}
let match = text[i + 1 | 0];
if (match !== undefined) {
switch (match) {
case "/" :
_acc = acc + "/";
_i = i + 2 | 0;
continue;
case "f" :
_acc = acc + "\x0c";
_i = i + 2 | 0;
continue;
}
}
let escaped = text.slice(i, i + 2 | 0);
_acc = acc + escaped;
_i = i + 2 | 0;
continue;
break;
default:
_acc = acc + c;
_i = i + 1 | 0;
continue;
}
};
};
let match = loop(pos, "");
return [
match[1],
match[0]
];
}
function parseDigits(text, pos) {
let len = text.length;
let _i = pos + 1 | 0;
while (true) {
let i = _i;
if (i >= len) {
return i;
}
let match = text[i];
if (match === undefined) {
return i;
}
switch (match) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
_i = i + 1 | 0;
continue;
default:
return i;
}
};
}
function parseWithDecimal(text, pos) {
let pos$1 = parseDigits(text, pos);
if (pos$1 < text.length && Primitive_object.equal(text[pos$1], ".")) {
return parseDigits(text, pos$1 + 1 | 0);
} else {
return pos$1;
}
}
function parseNumber(text, pos) {
let pos$1 = parseWithDecimal(text, pos);
let ln = text.length;
if (!(pos$1 < (ln - 1 | 0) && (Primitive_object.equal(text[pos$1], "E") || Primitive_object.equal(text[pos$1], "e")))) {
return pos$1;
}
let match = text[pos$1 + 1 | 0];
let pos$2;
if (match !== undefined) {
switch (match) {
case "+" :
case "-" :
pos$2 = pos$1 + 2 | 0;
break;
default:
pos$2 = pos$1 + 1 | 0;
}
} else {
pos$2 = pos$1 + 1 | 0;
}
return parseDigits(text, pos$2);
}
function parseNegativeNumber(text, pos) {
let final = Primitive_object.equal(text[pos], "-") ? parseNumber(text, pos + 1 | 0) : parseNumber(text, pos);
let numStr = text.slice(pos, final);
return [
{
TAG: "Number",
_0: parseFloat(numStr)
},
final
];
}
function expect(char, text, pos, message) {
if (Primitive_object.notequal(text[pos], char)) {
return fail(text, pos, "Expected: " + message);
} else {
return pos + 1 | 0;
}
}
function parseComment(text, pos, next) {
if (Primitive_object.notequal(text[pos], "/")) {
if (Primitive_object.equal(text[pos], "*")) {
return next(text, skipToCloseMultilineComment(text, pos + 1 | 0));
} else {
return Pervasives.failwith("Invalid syntax");
}
} else {
return next(text, skipToNewline(text, pos + 1 | 0));
}
}
function maybeSkipComment(text, pos) {
if (pos < text.length && Primitive_object.equal(text[pos], "/")) {
if ((pos + 1 | 0) < text.length && Primitive_object.equal(text[pos + 1 | 0], "/")) {
return skipToNewline(text, pos + 1 | 0);
} else if ((pos + 1 | 0) < text.length && Primitive_object.equal(text[pos + 1 | 0], "*")) {
return skipToCloseMultilineComment(text, pos + 1 | 0);
} else {
return fail(text, pos, "Invalid synatx");
}
} else {
return pos;
}
}
function skip(text, _pos) {
while (true) {
let pos = _pos;
if (pos === text.length) {
return pos;
}
let n = maybeSkipComment(text, skipWhite(text, pos));
if (n <= pos) {
return n;
}
_pos = n;
continue;
};
}
function parse(text, _pos) {
while (true) {
let pos = _pos;
if (pos >= text.length) {
return fail(text, pos, "Reached end of file without being done parsing");
}
let match = text[pos];
if (match === undefined) {
return fail(text, pos, "unexpected character");
}
switch (match) {
case "/" :
return parseComment(text, pos + 1 | 0, parse);
case "-" :
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
return parseNegativeNumber(text, pos);
case "[" :
return parseArray(text, pos + 1 | 0);
case "\"" :
let match$1 = parseString(text, pos + 1 | 0);
return [
{
TAG: "String",
_0: match$1[0]
},
match$1[1]
];
case " " :
case "\n" :
case "\r" :
case "\t" :
break;
case "f" :
if (text.slice(pos, pos + 5 | 0) === "false") {
return [
"False",
pos + 5 | 0
];
} else {
return fail(text, pos, "unexpected character");
}
case "n" :
if (text.slice(pos, pos + 4 | 0) === "null") {
return [
"Null",
pos + 4 | 0
];
} else {
return fail(text, pos, "unexpected character");
}
case "t" :
if (text.slice(pos, pos + 4 | 0) === "true") {
return [
"True",
pos + 4 | 0
];
} else {
return fail(text, pos, "unexpected character");
}
case "{" :
return parseObject(text, pos + 1 | 0);
default:
return fail(text, pos, "unexpected character");
}
_pos = skipWhite(text, pos);
continue;
};
}
function parseArrayValue(text, pos) {
let pos$1 = skip(text, pos);
let match = parse(text, pos$1);
let value = match[0];
let pos$2 = skip(text, match[1]);
let match$1 = text[pos$2];
if (match$1 === undefined) {
return fail(text, pos$2, "unexpected character");
}
switch (match$1) {
case "," :
let pos$3 = skip(text, pos$2 + 1 | 0);
if (Primitive_object.equal(text[pos$3], "]")) {
return [
{
hd: value,
tl: /* [] */0
},
pos$3 + 1 | 0
];
}
let match$2 = parseArrayValue(text, pos$3);
return [
{
hd: value,
tl: match$2[0]
},
match$2[1]
];
case "]" :
return [
{
hd: value,
tl: /* [] */0
},
pos$2 + 1 | 0
];
default:
return fail(text, pos$2, "unexpected character");
}
}
function parseArray(text, pos) {
let pos$1 = skip(text, pos);
let match = text[pos$1];
if (match === "]") {
return [
{
TAG: "Array",
_0: /* [] */0
},
pos$1 + 1 | 0
];
}
let match$1 = parseArrayValue(text, pos$1);
return [
{
TAG: "Array",
_0: match$1[0]
},
match$1[1]
];
}
function parseObjectValue(text, pos) {
let pos$1 = skip(text, pos);
if (Primitive_object.notequal(text[pos$1], "\"")) {
return fail(text, pos$1, "Expected string");
}
let match = parseString(text, pos$1 + 1 | 0);
let key = match[0];
let pos$2 = skip(text, match[1]);
let pos$3 = expect(":", text, pos$2, "Colon");
let match$1 = parse(text, pos$3);
let value = match$1[0];
let pos$4 = skip(text, match$1[1]);
let match$2 = text[pos$4];
if (match$2 !== undefined) {
switch (match$2) {
case "," :
let pos$5 = skip(text, pos$4 + 1 | 0);
if (Primitive_object.equal(text[pos$5], "}")) {
return [
{
hd: [
key,
value
],
tl: /* [] */0
},
pos$5 + 1 | 0
];
}
let match$3 = parseObjectValue(text, pos$5);
return [
{
hd: [
key,
value
],
tl: match$3[0]
},
match$3[1]
];
case "}" :
return [
{
hd: [
key,
value
],
tl: /* [] */0
},
pos$4 + 1 | 0
];
}
}
let match$4 = parseObjectValue(text, pos$4);
return [
{
hd: [
key,
value
],
tl: match$4[0]
},
match$4[1]
];
}
function parseObject(text, pos) {
let pos$1 = skip(text, pos);
if (Primitive_object.equal(text[pos$1], "}")) {
return [
{
TAG: "Object",
_0: /* [] */0
},
pos$1 + 1 | 0
];
}
let match = parseObjectValue(text, pos$1);
return [
{
TAG: "Object",
_0: match[0]
},
match[1]
];
}
let Parser = {
split_by: split_by,
fail: fail,
skipToNewline: skipToNewline,
stringTail: stringTail,
skipToCloseMultilineComment: skipToCloseMultilineComment,
skipWhite: skipWhite,
parseString: parseString,
parseDigits: parseDigits,
parseWithDecimal: parseWithDecimal,
parseNumber: parseNumber,
parseNegativeNumber: parseNegativeNumber,
expect: expect,
parseComment: parseComment,
maybeSkipComment: maybeSkipComment,
skip: skip,
parse: parse,
parseArrayValue: parseArrayValue,
parseArray: parseArray,
parseObjectValue: parseObjectValue,
parseObject: parseObject
};
function parse$1(text) {
let match = parse(text, 0);
let pos = skip(text, match[1]);
if (pos < text.length) {
return Pervasives.failwith("Extra data after parse finished: " + text.slice(pos, text.length));
} else {
return match[0];
}
}
function bind(v, fn) {
if (v !== undefined) {
return fn(Primitive_option.valFromOption(v));
}
}
function get(key, t) {
if (typeof t !== "object") {
return;
}
if (t.TAG !== "Object") {
return;
}
let _items = t._0;
while (true) {
let items = _items;
if (items === 0) {
return;
}
let match = items.hd;
if (match[0] === key) {
return Primitive_option.some(match[1]);
}
_items = items.tl;
continue;
};
}
function nth(n, t) {
if (typeof t !== "object") {
return;
}
if (t.TAG !== "Array") {
return;
}
let items = t._0;
if (n < Stdlib_List.length(items)) {
return Stdlib_List.getOrThrow(items, n);
}
}
function string(t) {
if (typeof t !== "object" || t.TAG !== "String") {
return;
} else {
return t._0;
}
}
function number(t) {
if (typeof t !== "object" || t.TAG !== "Number") {
return;
} else {
return t._0;
}
}
function array(t) {
if (typeof t !== "object" || t.TAG !== "Array") {
return;
} else {
return t._0;
}
}
function obj(t) {
if (typeof t !== "object" || t.TAG !== "Object") {
return;
} else {
return t._0;
}
}
function bool(t) {
if (typeof t === "object") {
return;
}
switch (t) {
case "True" :
return true;
case "False" :
return false;
default:
return;
}
}
function $$null(t) {
if (typeof t !== "object" && t === "Null") {
return Primitive_option.some(undefined);
}
}
function parsePath(_keyList, _t) {
while (true) {
let t = _t;
let keyList = _keyList;
if (keyList === 0) {
return t;
}
let value = get(keyList.hd, t);
if (value === undefined) {
return;
}
_t = value;
_keyList = keyList.tl;
continue;
};
}
function getPath(path, t) {
let keys = split_by(undefined, c => Primitive_object.equal(c, "."), path);
return parsePath(keys, t);
}
export {
string_of_number,
Infix,
escape,
stringify,
white,
stringifyPretty,
unwrap,
Parser,
parse$1 as parse,
bind,
get,
nth,
string,
number,
array,
obj,
bool,
$$null,
parsePath,
getPath,
}
/* No side effect */
================================================
FILE: analysis/examples/example-project/src/ModuleWithDocComment.res
================================================
@@ocaml.doc("This comment is for the **toplevel** module.")
@ocaml.doc("This comment is for the first **nested** module.")
module Nested = {
let x = "123"
@ocaml.doc("This comment is for the inner **nested-again** module.")
module NestedAgain = {
let y = 123
}
}
module M = Nested.NestedAgain
================================================
FILE: analysis/examples/example-project/src/ModuleWithDocComment.res.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
let NestedAgain = {
y: 123
};
let Nested = {
x: "123",
NestedAgain: NestedAgain
};
let M;
export {
Nested,
M,
}
/* No side effect */
================================================
FILE: analysis/examples/example-project/src/More.res
================================================
@@ocaml.doc(" Toplevel docs ")
@ocaml.doc(" Some contents ")
let contnets = "here"
let inner = 20
let n = 10
let party = 30
let awesome = 200
================================================
FILE: analysis/examples/example-project/src/More.res.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
let contnets = "here";
let inner = 20;
let n = 10;
let party = 30;
export {
contnets,
inner,
n,
party,
}
/* No side effect */
================================================
FILE: analysis/examples/example-project/src/More.resi
================================================
let contnets: string
let inner: int
let n: int
let party: int
================================================
FILE: analysis/examples/example-project/src/Other.res
================================================
/* let later = 10; */
/* Ok testing things */
let something = 10
type person = {name: string, age: int}
type animals = Things(int) | People(string) | Mouse
let inner = 10
/* More.outer; */
let m = Things(1)
/* working on things. */
let z = {name: "hi", age: 20}
let later = 20
let concat = (~first, ~second) => first + second
type other = {person: person, height: float}
let oo = {person: z, height: 34.2}
let show = o => {
let m = o.height
}
================================================
FILE: analysis/examples/example-project/src/Other.res.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
let z = {
name: "hi",
age: 20
};
function concat(first, second) {
return first + second | 0;
}
let oo = {
person: z,
height: 34.2
};
function show(o) {
}
let something = 10;
let inner = 10;
let m = {
TAG: "Things",
_0: 1
};
let later = 20;
export {
something,
inner,
m,
z,
later,
concat,
oo,
show,
}
/* No side effect */
================================================
FILE: analysis/examples/example-project/src/TransformHelpers.res
================================================
let deserialize_Belt__HashMapInt__t = (transformer, t) => assert(false)
let deserialize_Belt_HashMapInt____t = (a, b) => assert(false)
let deserialize_Belt__HashMap__Int__t = (a, b) => assert(false)
let serialize_Belt_HashMapInt____t = (a, b) => assert(false)
let serialize_Belt__HashMap__Int__t = (a, b) => assert(false)
let serialize_Belt_HashMapInt____t = (transformer, t) => assert(false)
================================================
FILE: analysis/examples/example-project/src/TransformHelpers.res.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
function deserialize_Belt__HashMapInt__t(transformer, t) {
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"TransformHelpers.res",
1,
58
],
Error: new Error()
};
}
function deserialize_Belt_HashMapInt____t(a, b) {
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"TransformHelpers.res",
3,
49
],
Error: new Error()
};
}
function deserialize_Belt__HashMap__Int__t(a, b) {
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"TransformHelpers.res",
5,
50
],
Error: new Error()
};
}
function serialize_Belt__HashMap__Int__t(a, b) {
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"TransformHelpers.res",
9,
48
],
Error: new Error()
};
}
function serialize_Belt_HashMapInt____t(transformer, t) {
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"TransformHelpers.res",
11,
57
],
Error: new Error()
};
}
export {
deserialize_Belt__HashMapInt__t,
deserialize_Belt_HashMapInt____t,
deserialize_Belt__HashMap__Int__t,
serialize_Belt__HashMap__Int__t,
serialize_Belt_HashMapInt____t,
}
/* No side effect */
================================================
FILE: analysis/examples/example-project/src/ZZ.res
================================================
let a = 12
let b = [1, 2, 3, a]
let c = <div />
let s = React.string
module M = {
@react.component
let make = (~x) => React.string(x)
}
let d = <M x="abc" />
module J = {
@react.component
let make = (~children: React.element) => React.null
}
let z =
<J>
{React.string("")}
{React.string("")}
</J>
type inline =
| A({x: int, y: string})
| B({x: int, y: string})
| C({
x: int,
y: string,
z: string,
w: string,
x0: string,
q1: string,
q2: string,
q3: string,
q4: string,
})
| D({x: int, y: string})
| E({x: int, y: string})
| F
module MSig: {
type rec t = A(list<s>)
and s = list<t>
let x: int
} = {
type rec t = A(list<s>)
and s = list<t>
let x = 14
}
module Impl = {
type rec t = A(list<s>)
and s = list<t>
type w = int
let x = 14
}
module Impl2 = {
include Impl
}
module D = MSig
module E = Impl
module F = Impl2
@ocaml.doc("str docstring")
type str = string
@ocaml.doc("gr docstring")
type gr = {x: int, s: str}
let testRecordFields = (gr: gr) => {
let str = gr.s
str
}
@ocaml.doc("vr docstring")
type vr = V1 | V2
let v1 = V1
module DoubleNested = ModuleWithDocComment.Nested.NestedAgain
let uncurried = x => x + 1
module Inner = {
type tInner = int
let vInner = 34
}
type typeInner = Inner.tInner
let valueInner = Inner.vInner
@ocaml.doc("Doc comment for functionWithTypeAnnotation")
let functionWithTypeAnnotation: unit => int = () => 1
module HoverInsideModuleWithComponent = {
let x = 2 // check that hover on x works
@react.component
let make = () => React.null
}
module Lib = {
let foo = (~age, ~name) => name ++ Int.toString(age)
let next = (~number=0, ~year) => number + year
}
@ocaml.doc("This module is commented") @deprecated("This module is deprecated")
module Dep: {
@ocaml.doc("Some doc comment") @deprecated("Use customDouble instead")
let customDouble: int => int
let customDouble2: int => int
} = {
let customDouble = foo => foo * 2
let customDouble2 = foo => foo * 2
}
let customDouble = foo => foo * 2
let cc = customDouble(11)
module O = {
module Comp = {
@react.component
let make = (~first="", ~kas=11, ~foo=3, ~second, ~v) =>
React.string(first ++ second ++ Int.toString(foo))
}
}
let comp = <O.Comp key="12" second="abcc" v=12 />
let lll = List.make(~length=3, 4)
let abc = "abc"
let arr = [1, 2, 3]
let some7 = Some(7)
================================================
FILE: analysis/examples/example-project/src/ZZ.res.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as Stdlib_List from "@rescript/runtime/lib/es6/Stdlib_List.js";
import * as JsxRuntime from "react/jsx-runtime";
let b = [
1,
2,
3,
12
];
let c = JsxRuntime.jsx("div", {});
function s(prim) {
return prim;
}
function ZZ$M(props) {
return props.x;
}
let M = {
make: ZZ$M
};
let d = JsxRuntime.jsx(ZZ$M, {
x: "abc"
});
function ZZ$J(props) {
return null;
}
let J = {
make: ZZ$J
};
let z = JsxRuntime.jsxs(ZZ$J, {
children: [
"",
""
]
});
let MSig = {
x: 14
};
let Impl = {
x: 14
};
let Impl2 = {
x: 14
};
function testRecordFields(gr) {
return gr.s;
}
function uncurried(x) {
return x + 1 | 0;
}
let Inner = {
vInner: 34
};
function functionWithTypeAnnotation() {
return 1;
}
function ZZ$HoverInsideModuleWithComponent(props) {
return null;
}
let HoverInsideModuleWithComponent = {
x: 2,
make: ZZ$HoverInsideModuleWithComponent
};
function foo(age, name) {
return name + age.toString();
}
function next(numberOpt, year) {
let number = numberOpt !== undefined ? numberOpt : 0;
return number + year | 0;
}
let Lib = {
foo: foo,
next: next
};
function customDouble(foo) {
return (foo << 1);
}
function customDouble2(foo) {
return (foo << 1);
}
let Dep = {
customDouble: customDouble,
customDouble2: customDouble2
};
function customDouble$1(foo) {
return (foo << 1);
}
let cc = 22;
function ZZ$O$Comp(props) {
let __foo = props.foo;
let __first = props.first;
let first = __first !== undefined ? __first : "";
let foo = __foo !== undefined ? __foo : 3;
return first + props.second + foo.toString();
}
let Comp = {
make: ZZ$O$Comp
};
let O = {
Comp: Comp
};
let comp = JsxRuntime.jsx(ZZ$O$Comp, {
second: "abcc",
v: 12
}, "12");
let lll = Stdlib_List.make(3, 4);
let arr = [
1,
2,
3
];
let a = 12;
let D;
let E;
let F;
let v1 = "V1";
let DoubleNested;
let valueInner = 34;
let abc = "abc";
let some7 = 7;
export {
a,
b,
c,
s,
M,
d,
J,
z,
MSig,
Impl,
Impl2,
D,
E,
F,
testRecordFields,
v1,
DoubleNested,
uncurried,
Inner,
valueInner,
functionWithTypeAnnotation,
HoverInsideModuleWithComponent,
Lib,
Dep,
customDouble$1 as customDouble,
cc,
O,
comp,
lll,
abc,
arr,
some7,
}
/* c Not a pure module */
================================================
FILE: analysis/examples/example-project/src/syntax/sample-highlighting.res
================================================
// Bindings
let numberBinding = 123
let someFunction = (param: int): int => {
let innerBinding = param + 2
innerBinding
}
// Types
type someRecord<'typeParameter> = {
someField: int,
someOtherField: string,
theParam: typeParameter,
another: bool,
to: string,
}
type someEnum =
| SomeMember
| AnotherMember
| SomeMemberWithPayload(someRecord<int>)
type somePolyEnum = [
| #someMember
| #AnotherMember
| #SomeMemberWithPayload(someRecord<int>)
| #"fourth Member"
]
// Destructuring
let destructuring = () => {
let someVar = (1, 2, 3)
let (one, two, three) = someVar
let someObj: someRecord<int> = {
someField: 1,
someOtherField: "hello",
theParam: 2,
another: true,
to: "123",
}
let {someField, someOtherField, theParam} = someObj
someField
}
module SomeModule = {
type t = Some | Value | Here
}
// Strings
let interpolated = `${numberBinding} ${"123"}`
// JSX
module SomeComponent = {
@react.component
let make = (
~someProp: int,
~otherProp: string,
~thirdProp: SomeModule.t,
~fourth: somePolyEnum=#"fourth member",
) => {
React.null
}
module Nested = {
@react.component
let make = (~children) => {
<> {children} </>
}
}
}
let jsx =
<div>
<SomeComponent someProp=123 otherProp="hello" thirdProp=Value fourth=#AnotherMember />
<SomeComponent.Nested> {React.string("Nested")} </SomeComponent.Nested>
</div>
================================================
FILE: analysis/examples/example-project/src/syntax/sample-highlighting.rs
================================================
// Bindings
fn some_function(param: usize) -> usize {
let innerBinding = param + 2;
innerBinding
}
// Types
struct someRecord<typeParameter> {
someField: usize,
someOtherField: String,
theParam: typeParameter,
}
enum someEnum {
SomeMember,
AnotherMember,
SomeMemberWithPayload(someRecord<usize>),
}
// Destructuring
fn destructuring() -> usize {
let someVar = (1, 2, 3);
let (one, two, three) = someVar;
let someObj = someRecord::<usize> {
someField: 1,
someOtherField: String::new("HEllo"),
theParam: 2,
};
someObj.someField
}
================================================
FILE: analysis/examples/example-project/src/syntax/sample-highlighting.tsx
================================================
// Bindings
let numberBinding = 123;
const SomeComp = {
Nested: () => null,
};
let someFunction = (param: number): number => {
let innerBinding = param + 2;
return innerBinding;
};
// Types
type someRecord<typeParameter> = {
someField: number;
someOtherField: string;
theParam: typeParameter;
another: boolean;
to: string;
};
enum someEnum {
SomeMember,
AnotherMember,
}
// Destructuring
let destructuring = () => {
let someVar = [1, 2, 3];
let [one, two, three] = someVar;
let someObj: someRecord<number> = {
someField: 1,
someOtherField: "hello",
theParam: 2,
another: true,
to: "123",
};
let { someField, someOtherField, theParam } = someObj;
return someField;
};
namespace SomeModule {
export enum t {
Some,
Value,
Here,
}
}
// Decorators and classes
function someDecorator() {
return function (
target: any,
propertyKey: string,
descriptor: PropertyDescriptor
) {
console.log("first(): called");
};
}
class SomeClass {
@someDecorator() doStuff() {
return 123;
}
}
// Strings
let interpolated = `${numberBinding} ${"123"}`;
// JSX
interface Props {
someProp: number;
otherProp: string;
thirdProp: SomeModule.t;
}
const SomeComponent = ({ someProp, otherProp, thirdProp }: Props) => {
return null;
};
let jsx = (
<div>
<SomeComponent
someProp={123}
otherProp="hello"
thirdProp={SomeModule.t.Value}
/>
<SomeComp.Nested />
{"Hello"}
</div>
);
function Property() {
throw new Error("Function not implemented.");
}
================================================
FILE: analysis/examples/larger-project/.gitignore
================================================
/node_modules
/lib
================================================
FILE: analysis/examples/larger-project/.merlin
================================================
####{BSB GENERATED: NO EDIT
FLG -ppx '/home/pedro/Desktop/Projects/rescript-vscode/analysis/examples/larger-project/node_modules/rescript/linux/bsc.exe -as-ppx -bs-jsx 3'
S /home/pedro/Desktop/Projects/rescript-vscode/analysis/examples/larger-project/node_modules/rescript/lib/ocaml
B /home/pedro/Desktop/Projects/rescript-vscode/analysis/examples/larger-project/node_modules/rescript/lib/ocaml
FLG -w +a-4-9-20-40-41-42-50-61-102
S /home/pedro/Desktop/Projects/rescript-vscode/analysis/examples/larger-project/node_modules/@rescript/react/lib/ocaml
B /home/pedro/Desktop/Projects/rescript-vscode/analysis/examples/larger-project/node_modules/@rescript/react/lib/ocaml
S /home/pedro/Desktop/Projects/rescript-vscode/analysis/examples/larger-project/node_modules/@glennsl/bs-json/lib/ocaml
B /home/pedro/Desktop/Projects/rescript-vscode/analysis/examples/larger-project/node_modules/@glennsl/bs-json/lib/ocaml
S src
B lib/bs/src
S src/exception
B lib/bs/src/exception
####BSB GENERATED: NO EDIT}
================================================
FILE: analysis/examples/larger-project/.watchmanconfig
================================================
================================================
FILE: analysis/examples/larger-project/bsconfig.json
================================================
{
"reanalyze": {
"analysis": ["dce"],
"suppress": [],
"unsuppress": []
},
"name": "sample-typescript-app",
"bsc-flags": ["-bs-super-errors -w a"],
"reason": { "react-jsx": 3 },
"bs-dependencies": ["@rescript/react", "@glennsl/bs-json"],
"sources": [
{
"dir": "src",
"subdirs": true
}
],
"package-specs": {
"module": "es6",
"in-source": true
}
}
================================================
FILE: analysis/examples/larger-project/package.json
================================================
{
"name": "large-project",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "rescript build -w",
"build": "rescript build",
"clean": "rescript clean -with-deps"
},
"devDependencies": {
"react": "^16.13.1",
"react-dom": "^16.8.6",
"rescript": "^9.1.4"
},
"dependencies": {
"@glennsl/bs-json": "^5.0.4",
"@rescript/react": "^0.10.3"
}
}
================================================
FILE: analysis/examples/larger-project/src/AutoAnnotate.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
================================================
FILE: analysis/examples/larger-project/src/AutoAnnotate.res
================================================
type variant = R(int)
@genType
type record = {variant: variant}
type r2 = {r2: int}
type r3 = {r3: int}
type r4 = {r4: int}
@genType
type annotatedVariant =
| R2(r2, r3)
| R4(r4)
================================================
FILE: analysis/examples/larger-project/src/BootloaderResource.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
================================================
FILE: analysis/examples/larger-project/src/BootloaderResource.res
================================================
/* NOTE: This is a spooky interface that provides no type safety. It should be
* improved. Use with caution. */
@module("BootloaderResource")
external read: JSResource.t<'a> => 'a = "read"
================================================
FILE: analysis/examples/larger-project/src/BucklescriptAnnotations.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
function bar(x) {
var f = x.twoArgs;
return f(3, "a");
}
export {
bar ,
}
/* No side effect */
================================================
FILE: analysis/examples/larger-project/src/BucklescriptAnnotations.res
================================================
@genType
type someMutableFields = {
@set
"mutable0": string,
"immutable": int,
@set
"mutable1": string,
@set
"mutable2": string,
}
@genType
type someMethods = {
@meth
"send": string => unit,
@meth
"on": (string, (. int) => unit) => unit,
@meth
"threeargs": (int, string, int) => string,
"twoArgs": (. int, string) => int,
}
// let foo = (x: someMethods) => x["threeargs"](3, "a", 4)
let bar = (x: someMethods) => {
let f = x["twoArgs"]
f(. 3, "a")
}
================================================
FILE: analysis/examples/larger-project/src/ComponentAsProp.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as React from "react";
import * as Caml_option from "rescript/lib/es6/caml_option.js";
function ComponentAsProp(Props) {
var title = Props.title;
var description = Props.description;
var button = Props.button;
return React.createElement("div", undefined, React.createElement("div", undefined, title, description, button !== undefined ? Caml_option.valFromOption(button) : null));
}
var make = ComponentAsProp;
export {
make ,
}
/* react Not a pure module */
================================================
FILE: analysis/examples/larger-project/src/ComponentAsProp.res
================================================
@ocaml.doc(
" This is like declaring a normal ReasonReact component's `make` function, except the body is a the interop hook wrapJsForReason "
)
@genType
@react.component
let make = (~title, ~description, ~button=?) => {
<div>
<div>
title
description
{switch button {
| Some(button) => button
| None => React.null
}}
</div>
</div>
}
================================================
FILE: analysis/examples/larger-project/src/CreateErrorHandler1.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as Curry from "rescript/lib/es6/curry.js";
import * as ErrorHandler from "./ErrorHandler.js";
function notification(s) {
return [
s,
s
];
}
var Error1 = {
notification: notification
};
var MyErrorHandler = ErrorHandler.Make(Error1);
Curry._1(MyErrorHandler.notify, "abc");
export {
Error1 ,
MyErrorHandler ,
}
/* MyErrorHandler Not a pure module */
================================================
FILE: analysis/examples/larger-project/src/CreateErrorHandler1.res
================================================
module Error1 = {
type t = string
let notification = s => (s, s)
}
module MyErrorHandler = ErrorHandler.Make(Error1)
MyErrorHandler.notify("abc")
================================================
FILE: analysis/examples/larger-project/src/CreateErrorHandler2.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as ErrorHandler from "./ErrorHandler.js";
function notification(n) {
return [
String(n),
""
];
}
var Error2 = {
notification: notification
};
var MyErrorHandler = ErrorHandler.Make(Error2);
export {
Error2 ,
MyErrorHandler ,
}
/* MyErrorHandler Not a pure module */
================================================
FILE: analysis/examples/larger-project/src/CreateErrorHandler2.res
================================================
module Error2 = {
type t = int
let notification = n => (string_of_int(n), "")
}
module MyErrorHandler = ErrorHandler.Make(Error2) /* MyErrorHandler.notify(42) */
================================================
FILE: analysis/examples/larger-project/src/DeadCodeImplementation.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
var M = {
x: 42
};
export {
M ,
}
/* No side effect */
================================================
FILE: analysis/examples/larger-project/src/DeadCodeImplementation.res
================================================
module M: DeadCodeInterface.T = {
let x = 42
}
================================================
FILE: analysis/examples/larger-project/src/DeadCodeInterface.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
================================================
FILE: analysis/examples/larger-project/src/DeadCodeInterface.res
================================================
module type T = {
let x: int
}
================================================
FILE: analysis/examples/larger-project/src/DeadExn.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as Caml_exceptions from "rescript/lib/es6/caml_exceptions.js";
var Etoplevel = /* @__PURE__ */Caml_exceptions.create("DeadExn.Etoplevel");
var Einside = /* @__PURE__ */Caml_exceptions.create("DeadExn.Inside.Einside");
var eInside = {
RE_EXN_ID: Einside
};
console.log(eInside);
export {
Etoplevel ,
}
/* Not a pure module */
================================================
FILE: analysis/examples/larger-project/src/DeadExn.res
================================================
exception Etoplevel
module Inside = {
exception Einside
}
exception DeadE
let eToplevel = Etoplevel
let eInside = Inside.Einside
Js.log(eInside)
================================================
FILE: analysis/examples/larger-project/src/DeadExn.resi
================================================
// empty
exception Etoplevel
================================================
FILE: analysis/examples/larger-project/src/DeadRT.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
console.log(/* Kaboom */0);
export {
}
/* Not a pure module */
================================================
FILE: analysis/examples/larger-project/src/DeadRT.res
================================================
type moduleAccessPath =
| Root(string)
| Kaboom
let rec emitModuleAccessPath = moduleAccessPath =>
switch moduleAccessPath {
| Root(s) => s
| Kaboom => ""
}
let () = Js.log(Kaboom)
================================================
FILE: analysis/examples/larger-project/src/DeadRT.resi
================================================
type moduleAccessPath =
| Root(string)
| Kaboom
================================================
FILE: analysis/examples/larger-project/src/DeadTest.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
================================================
FILE: analysis/examples/larger-project/src/DeadTest.res
================================================
================================================
FILE: analysis/examples/larger-project/src/DeadTestBlacklist.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
var x = 34;
export {
x ,
}
/* No side effect */
================================================
FILE: analysis/examples/larger-project/src/DeadTestBlacklist.res
================================================
let x = 34
================================================
FILE: analysis/examples/larger-project/src/DeadTestWithInterface.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
================================================
FILE: analysis/examples/larger-project/src/DeadTestWithInterface.res
================================================
module Ext_buffer: {
let x: int
} = {
let x = 42
}
================================================
FILE: analysis/examples/larger-project/src/DeadTestWithInterface.resi
================================================
================================================
FILE: analysis/examples/larger-project/src/DeadTypeTest.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
var a = /* A */0;
export {
a ,
}
/* No side effect */
================================================
FILE: analysis/examples/larger-project/src/DeadTypeTest.res
================================================
type t =
| A
| B
let a = A
type deadType =
| OnlyInImplementation
| OnlyInInterface
| InBoth
| InNeither
let _ = OnlyInImplementation
let _ = InBoth
@live
type record = {x: int, y: string, z: float}
================================================
FILE: analysis/examples/larger-project/src/DeadTypeTest.resi
================================================
type t =
| A
| B
let a: t
type deadType =
| OnlyInImplementation
| OnlyInInterface
| InBoth
| InNeither
================================================
FILE: analysis/examples/larger-project/src/DeadValueTest.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
var valueAlive = 1;
var valueDead = 2;
export {
valueAlive ,
valueDead ,
}
/* No side effect */
================================================
FILE: analysis/examples/larger-project/src/DeadValueTest.res
================================================
let valueAlive = 1
let valueDead = 2
let valueOnlyInImplementation = 3
@raises(Failure)
let rec subList = (b, e, l) =>
switch l {
| list{} => failwith("subList")
| list{h, ...t} =>
let tail = if e == 0 {
list{}
} else {
subList(b - 1, e - 1, t)
}
if b > 0 {
tail
} else {
list{h, ...tail}
}
}
================================================
FILE: analysis/examples/larger-project/src/DeadValueTest.resi
================================================
let valueAlive: int
let valueDead: int
================================================
FILE: analysis/examples/larger-project/src/Docstrings.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
function signMessage(message, key) {
return message + String(key);
}
function one(a) {
return a + 0 | 0;
}
function two(a, b) {
return (a + b | 0) + 0 | 0;
}
function tree(a, b, c) {
return ((a + b | 0) + c | 0) + 0 | 0;
}
function oneU(a) {
return a + 0 | 0;
}
function twoU(a, b) {
return (a + b | 0) + 0 | 0;
}
function treeU(a, b, c) {
return ((a + b | 0) + c | 0) + 0 | 0;
}
function useParam(param) {
return param + 34 | 0;
}
function useParamU(param) {
return param + 34 | 0;
}
function unnamed1(param) {
return 34;
}
function unnamed1U(param) {
return 34;
}
function unnamed2(param, param$1) {
return 34;
}
function unnamed2U(param, param$1) {
return 34;
}
function grouped(x, y, a, b, c, z) {
return ((((x + y | 0) + a | 0) + b | 0) + c | 0) + z | 0;
}
function unitArgWithoutConversion(param) {
return "abc";
}
function unitArgWithoutConversionU() {
return "abc";
}
function unitArgWithConversion(param) {
return /* A */0;
}
function unitArgWithConversionU() {
return /* A */0;
}
var flat = 34;
export {
flat ,
signMessage ,
one ,
two ,
tree ,
oneU ,
twoU ,
treeU ,
useParam ,
useParamU ,
unnamed1 ,
unnamed1U ,
unnamed2 ,
unnamed2U ,
grouped ,
unitArgWithoutConversion ,
unitArgWithoutConversionU ,
unitArgWithConversion ,
unitArgWithConversionU ,
}
/* No side effect */
================================================
FILE: analysis/examples/larger-project/src/Docstrings.res
================================================
@ocaml.doc(" hello ") @genType
let flat = 34
@ocaml.doc("
* Sign a message with a key.
*
* @param message - A message to be signed
* @param key - The key with which to sign the message
* @returns A signed message
")
@genType
let signMessage = (. message, key) => message ++ string_of_int(key)
@genType
let one = a => a + 0
@genType
let two = (a, b) => a + b + 0
@genType
let tree = (a, b, c) => a + b + c + 0
@genType
let oneU = (. a) => a + 0
@genType
let twoU = (. a, b) => a + b + 0
@genType
let treeU = (. a, b, c) => a + b + c + 0
@genType
let useParam = param => param + 34
@genType
let useParamU = (. param) => param + 34
@genType
let unnamed1 = (_: int) => 34
@genType
let unnamed1U = (. _: int) => 34
@genType
let unnamed2 = (_: int, _: int) => 34
@genType
let unnamed2U = (. _: int, _: int) => 34
@genType
let grouped = (~x, ~y, a, b, c, ~z) => x + y + a + b + c + z
@genType
let unitArgWithoutConversion = () => "abc"
@genType
let unitArgWithoutConversionU = (. ()) => "abc"
type t =
| A
| B
@genType
let unitArgWithConversion = () => A
@genType
let unitArgWithConversionU = (. ()) => A
================================================
FILE: analysis/examples/larger-project/src/DynamicallyLoadedComponent.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
function DynamicallyLoadedComponent(Props) {
return Props.s;
}
var make = DynamicallyLoadedComponent;
export {
make ,
}
/* No side effect */
================================================
FILE: analysis/examples/larger-project/src/DynamicallyLoadedComponent.res
================================================
@react.component
let make = (~s) => React.string(s)
================================================
FILE: analysis/examples/larger-project/src/EmptyArray.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as React from "react";
function EmptyArray$Z(Props) {
return React.createElement("br", undefined);
}
var Z = {
make: EmptyArray$Z
};
React.createElement(EmptyArray$Z, {});
export {
Z ,
}
/* Not a pure module */
================================================
FILE: analysis/examples/larger-project/src/EmptyArray.res
================================================
// @@config({flags : ["-dsource"]});
module Z = {
@react.component
let make = () => {
<br />
}
}
let _ = <Z />
================================================
FILE: analysis/examples/larger-project/src/ErrorHandler.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as Curry from "rescript/lib/es6/curry.js";
function Make($$Error) {
var notify = function (x) {
return Curry._1($$Error.notification, x);
};
return {
notify: notify
};
}
var x = 42;
export {
Make ,
x ,
}
/* No side effect */
================================================
FILE: analysis/examples/larger-project/src/ErrorHandler.res
================================================
module type Error = {
type t
let notification: t => (string, string)
}
module Make = (Error: Error) => {
let notify = x => Error.notification(x)
}
// This is ignored as there's an interface file
@genType
let x = 42
================================================
FILE: analysis/examples/larger-project/src/ErrorHandler.resi
================================================
module type Error = {
type t
let notification: t => (string, string)
}
module Make: (Error: Error) =>
{
let notify: Error.t => (string, string)
}
let x: int
================================================
FILE: analysis/examples/larger-project/src/EverythingLiveHere.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
var x = 1;
var y = 3;
var z = 4;
export {
x ,
y ,
z ,
}
/* No side effect */
================================================
FILE: analysis/examples/larger-project/src/EverythingLiveHere.res
================================================
let x = 1
let y = 3
let z = 4
================================================
FILE: analysis/examples/larger-project/src/FC.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
function foo(impl) {
return impl.make;
}
console.log(foo);
export {
foo ,
}
/* Not a pure module */
================================================
FILE: analysis/examples/larger-project/src/FC.res
================================================
module type ReplacebleComponent = {
@react.component
let make: unit => React.element
}
let foo = (~impl: module(ReplacebleComponent)) => {
let module(X) = impl
X.make
}
Js.log(foo)
================================================
FILE: analysis/examples/larger-project/src/FirstClassModules.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
var y = "abc";
var EmptyInnerModule = {};
var InnerModule2 = {
k: 4242
};
function k3(x) {
return x + 1 | 0;
}
var InnerModule3 = {
k3: k3
};
var Z = {
u: [
0,
0
]
};
var M = {
y: y,
EmptyInnerModule: EmptyInnerModule,
InnerModule2: InnerModule2,
InnerModule3: InnerModule3,
Z: Z,
x: 42
};
var firstClassModule = {
x: 42,
EmptyInnerModule: EmptyInnerModule,
InnerModule2: InnerModule2,
InnerModule3: InnerModule3,
Z: Z,
y: y
};
function testConvert(m) {
return m;
}
function SomeFunctor(X) {
return {
ww: X.y
};
}
function someFunctorAsFunction(x) {
return {
ww: x.y
};
}
export {
M ,
firstClassModule ,
testConvert ,
SomeFunctor ,
someFunctorAsFunction ,
}
/* No side effect */
================================================
FILE: analysis/examples/larger-project/src/FirstClassModules.res
================================================
module type MT = {
let x: int
type t = int
@module("foo") external f: int => int = "f"
module type MT2 = {
type tt = string
}
module EmptyInnerModule: {}
module InnerModule2: {
let k: t
}
module InnerModule3: {
type inner = int
let k3: inner => inner
}
module type TT = {
let u: (int, int)
}
module Z: TT
let y: string
}
module M = {
let y = "abc"
module type MT2 = {
type tt = string
}
module EmptyInnerModule = {}
module InnerModule2 = {
let k = 4242
}
module InnerModule3 = {
type inner = int
let k3 = x => x + 1
}
module type TT = {
let u: (int, int)
}
module Z = {
let u = (0, 0)
}
type t = int
@module("foo") external f: int => int = "f"
let x = 42
}
@genType
type firstClassModule = module(MT)
@genType
let firstClassModule: firstClassModule = module(M)
@genType
let testConvert = (m: module(MT)) => m
module type ResT = {
let ww: string
}
module SomeFunctor = (X: MT): ResT => {
let ww = X.y
}
@genType
let someFunctorAsFunction = (x: module(MT)): module(ResT) => module(SomeFunctor(unpack(x)))
================================================
FILE: analysis/examples/larger-project/src/FirstClassModulesInterface.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
var r = {
x: 3,
y: "hello"
};
export {
r ,
}
/* No side effect */
================================================
FILE: analysis/examples/larger-project/src/FirstClassModulesInterface.res
================================================
type record = {
x: int,
y: string,
}
let r = {x: 3, y: "hello"}
module type MT = {
let x: int
}
type firstClassModule = module(MT)
================================================
FILE: analysis/examples/larger-project/src/FirstClassModulesInterface.resi
================================================
@genType
type record = {
x: int,
y: string,
}
let r: record
@genType
module type MT = {
let x: int
}
@genType
type firstClassModule = module(MT)
================================================
FILE: analysis/examples/larger-project/src/Hooks.js
================================================
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as Curry from "rescript/lib/es6/curry.js";
import * as React from "react";
import * as ImportHooks from "./ImportHooks.js";
import * as ImportHookDefault from "./ImportHookDefault.js";
function Hooks(Props) {
var vehicle = Props.vehicle;
var match = React.useState(function () {
return 0;
});
var setCount = match[1];
var count = match[0];
return React.createElement("div", undefined, React.createElement("p", undefined, "Hooks example " + (vehicle.name + (" clicked " + (String(count) + " times")))), React.createElement("button", {
onClick: (function (param) {
return Curry._1(setCount, (function (param) {
return count + 1 | 0;
}));
})
}, "Click me"), React.createElement(ImportHooks.make, {
person: {
name: "Mary",
age: 71
},
children: null,
renderMe: (function (x) {
return x.randomString;
})
}, "child1", "child2"), React.createElement(ImportHookDefault.make, {
person: {
name: "DefaultImport",
age: 42
},
children: null,
renderMe: (function (x) {
return x.randomString;
})
}, "child1", "child2"));
}
function Hooks$anotherComponent(Props) {
var vehicle = Props.vehicle;
var callback = Props.callback;
Curry._1(callback, undefined);
return React.createElement("div", undefined, "Another Hook " + vehicle.name);
}
function Hooks$Inner(Props) {
var vehicle = Props.vehicle;
return React.createElement("div", undefined, "Another Hook " + vehicle.name);
}
function Hooks$Inner$anotherComponent(Props) {
var vehicle = Props.vehicle;
return React.createElement("div", undefined, "Another Hook " + vehicle.name);
}
function Hooks$Inner$Inner2(Props) {
var vehicle = Props.vehicle;
return React.createElement("div", undefined, "Another Hook " + vehicle.name);
}
function Hooks$Inner$Inner2$anotherComponent(Props) {
var vehicle = Props.vehicle;
return React.createElement("div", undefined, "Another Hook " + vehicle.name);
}
var Inner2 = {
make: Hooks$Inner$Inner2,
anotherComponent: Hooks$Inner$Inner2$anotherComponent
};
var Inner = {
make: Hooks$Inner,
anotherComponent: Hooks$Inner$anotherComponent,
Inner2: Inner2
};
function Hooks$NoProps(Props) {
return React.createElement("div", undefined, null);
}
var NoProps = {
make: Hooks$NoProps
};
function functionWithRenamedArgs(_to, _Type, cb) {
Curry._1(cb, _to);
return _to.name + _Type.name;
}
function Hooks$componentWithRenamedArgs(Props) {
var _to = Props.to;
var _Type = Props.Type;
var cb = Props.cb;
Curry._1(cb, _to);
return _to.name + _Type.name;
}
function Hooks$makeWithRef(Props) {
var vehicle = Props.vehicle;
return function (ref) {
if (ref == null) {
return null;
} else {
return React.createElement("button", {
ref: ref
}, vehicle.name);
}
};
}
var testForwardRef = React.forwardRef(function (param, param$1) {
return Hooks$makeWithRef(param)(param$1);
});
var input = React.forwardRef(function (Props, param) {
var partial_arg = Props.r;
return React.createElement("div", {
ref: param
}, partial_arg.x);
});
function Hooks$polymorphicComponent(Props) {
var param = Props.p;
return param[0].name;
}
function Hooks$functionReturningReactElement(Props) {
return Props.name;
}
function Hooks$RenderPropRequiresConversion(Props) {
var renderVehicle = Props.renderVehicle;
return Curry._1(renderVehicle, {
vehicle: {
name: "Car"
},
number: 42
});
}
var RenderPropRequiresConversion = {
make: Hooks$RenderPropRequiresConversion
};
function Hooks$aComponentWithChildren(Props) {
var vehicle = Props.vehicle;
var children = Props.children;
return React.createElement("div", undefined, "Another Hook " + vehicle.name, React.createElement("div", undefined, children));
}
var make = Hooks;
var $$default = Hooks;
var anotherComponent = Hooks$anotherComponent;
var componentWithRenamedArgs = Hooks$componentWithRenamedArgs;
var makeWithRef = Hooks$makeWithRef;
var polymorphicComponent = Hooks$polymorphicComponent;
var functionReturningReactElement = Hooks$functionReturningReactElement;
var aComponentWithChildren = Hooks$aComponentWithChildren;
export {
make ,
$$default ,
$$default as default,
anotherComponent ,
Inner ,
NoProps ,
functionWithRenamedArgs ,
componentWithRenamedArgs ,
makeWithRef ,
testForwardRef ,
input ,
polymorphicComponent ,
functionReturningReactElement ,
RenderPropRequiresConversion ,
aComponentWithChildren ,
}
/* testForwardRef Not a pure module */
================================================
FILE: analysis/examples/larger-project/src/Hooks.res
================================================
type vehicle = {name: string}
@react.component
let make = (~vehicle) => {
let (count, setCount) = React.useState(() => 0)
<div>
<p>
{React.string(
"Hooks example " ++ (vehicle.name ++ (" clicked " ++ (string_of_int(count) ++ " times"))),
)}
</p>
<button onClick={_ => setCount(_ => count + 1)}> {React.string("Click me")} </button>
<ImportHooks person={name: "Mary", age: 71} renderMe={x => React.string(x["randomString"])}>
{React.string("child1")} {React.string("child2")}
</ImportHooks>
<ImportHookDefault
person={name: "DefaultImport", age: 42} renderMe={x => React.string(x["randomString"])}>
{React.string("child1")} {React.string("child2")}
</ImportHookDefault>
</div>
}
@genType
let default = make
@genType @react.component
let anotherComponent = (~vehicle, ~callback: unit => unit) => {
callback()
<div> {React.string("Another Hook " ++ vehicle.name)} </div>
}
module Inner = {
@genType @react.component
let make = (~vehicle) => <div> {React.string("Another Hook " ++ vehicle.name)} </div>
@genType @react.component
let anotherComponent = (~vehicle) => <div> {React.string("Another Hook " ++ vehicle.name)} </div>
module Inner2 = {
@genType @react.component
let make = (~vehicle) => <div> {React.string("Another Hook " ++ vehicle.name)} </div>
@genType @react.component
let anotherComponent = (~vehicle) =>
<div> {React.string("Another Hook " ++ vehicle.name)} </div>
}
}
module NoProps = {
@genType @react.component
let make = () => <div> React.null </div>
}
type cb = (~_to: vehicle) => unit
@genType
let functionWithRenamedArgs = (~_to, ~_Type, ~cb: cb) => {
cb(~_to)
_to.name ++ _Type.name
}
@genType @react.component
let componentWithRenamedArgs = (~_to, ~_Type, ~cb: cb) => {
cb(~_to)
React.string(_to.name ++ _Type.name)
}
@genType @react.component
let makeWithRef = (~vehicle) => {
let _ = 34
ref =>
switch ref->Js.Nullable.toOption {
| Some(ref) => <button ref={ReactDOM.Ref.domRef(ref)}> {React.string(vehicle.name)} </button>
| None => React.null
}
}
@genType
let testForwardRef = React.forwardRef(makeWithRef)
type r = {x: string}
@genType @react.component
let input = React.forwardRef((~r, (), ref) => <div ref={Obj.magic(ref)}> {React.string(r.x)} </div>)
@genType
type callback<'input, 'output> = React.callback<'input, 'output>
@genType
type testReactContext = React.Context.t<int>
@genType
type testReactRef = React.Ref.t<int>
@genType
type testDomRef = ReactDOM.domRef
@genType @react.component
let polymorphicComponent = (~p as (x, _)) => React.string(x.name
gitextract_gb5prtmt/ ├── .github/ │ └── workflows/ │ ├── bump-version.js │ └── ci.yml ├── .gitignore ├── .ocamlformat ├── .ocamlformat-ignore ├── .prettierignore ├── .prettierrc ├── .vscode/ │ ├── extensions.json │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── .vscodeignore ├── AGENTS.md ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── Makefile ├── README.md ├── analysis/ │ ├── Makefile │ ├── README.md │ ├── bin/ │ │ ├── dune │ │ └── main.ml │ ├── dune │ ├── examples/ │ │ ├── example-project/ │ │ │ ├── .gitignore │ │ │ ├── .vscode/ │ │ │ │ └── settings.json │ │ │ ├── package.json │ │ │ ├── rescript.json │ │ │ └── src/ │ │ │ ├── Embeded.md │ │ │ ├── Hello.res │ │ │ ├── Hello.res.js │ │ │ ├── Json.res │ │ │ ├── Json.res.js │ │ │ ├── ModuleWithDocComment.res │ │ │ ├── ModuleWithDocComment.res.js │ │ │ ├── More.res │ │ │ ├── More.res.js │ │ │ ├── More.resi │ │ │ ├── Other.res │ │ │ ├── Other.res.js │ │ │ ├── TransformHelpers.res │ │ │ ├── TransformHelpers.res.js │ │ │ ├── ZZ.res │ │ │ ├── ZZ.res.js │ │ │ └── syntax/ │ │ │ ├── sample-highlighting.res │ │ │ ├── sample-highlighting.rs │ │ │ └── sample-highlighting.tsx │ │ ├── larger-project/ │ │ │ ├── .gitignore │ │ │ ├── .merlin │ │ │ ├── .watchmanconfig │ │ │ ├── bsconfig.json │ │ │ ├── package.json │ │ │ └── src/ │ │ │ ├── AutoAnnotate.js │ │ │ ├── AutoAnnotate.res │ │ │ ├── BootloaderResource.js │ │ │ ├── BootloaderResource.res │ │ │ ├── BucklescriptAnnotations.js │ │ │ ├── BucklescriptAnnotations.res │ │ │ ├── ComponentAsProp.js │ │ │ ├── ComponentAsProp.res │ │ │ ├── CreateErrorHandler1.js │ │ │ ├── CreateErrorHandler1.res │ │ │ ├── CreateErrorHandler2.js │ │ │ ├── CreateErrorHandler2.res │ │ │ ├── DeadCodeImplementation.js │ │ │ ├── DeadCodeImplementation.res │ │ │ ├── DeadCodeInterface.js │ │ │ ├── DeadCodeInterface.res │ │ │ ├── DeadExn.js │ │ │ ├── DeadExn.res │ │ │ ├── DeadExn.resi │ │ │ ├── DeadRT.js │ │ │ ├── DeadRT.res │ │ │ ├── DeadRT.resi │ │ │ ├── DeadTest.js │ │ │ ├── DeadTest.res │ │ │ ├── DeadTestBlacklist.js │ │ │ ├── DeadTestBlacklist.res │ │ │ ├── DeadTestWithInterface.js │ │ │ ├── DeadTestWithInterface.res │ │ │ ├── DeadTestWithInterface.resi │ │ │ ├── DeadTypeTest.js │ │ │ ├── DeadTypeTest.res │ │ │ ├── DeadTypeTest.resi │ │ │ ├── DeadValueTest.js │ │ │ ├── DeadValueTest.res │ │ │ ├── DeadValueTest.resi │ │ │ ├── Docstrings.js │ │ │ ├── Docstrings.res │ │ │ ├── DynamicallyLoadedComponent.js │ │ │ ├── DynamicallyLoadedComponent.res │ │ │ ├── EmptyArray.js │ │ │ ├── EmptyArray.res │ │ │ ├── ErrorHandler.js │ │ │ ├── ErrorHandler.res │ │ │ ├── ErrorHandler.resi │ │ │ ├── EverythingLiveHere.js │ │ │ ├── EverythingLiveHere.res │ │ │ ├── FC.js │ │ │ ├── FC.res │ │ │ ├── FirstClassModules.js │ │ │ ├── FirstClassModules.res │ │ │ ├── FirstClassModulesInterface.js │ │ │ ├── FirstClassModulesInterface.res │ │ │ ├── FirstClassModulesInterface.resi │ │ │ ├── Hooks.js │ │ │ ├── Hooks.res │ │ │ ├── IgnoreInterface.js │ │ │ ├── IgnoreInterface.res │ │ │ ├── IgnoreInterface.resi │ │ │ ├── ImmutableArray.js │ │ │ ├── ImmutableArray.res │ │ │ ├── ImmutableArray.resi │ │ │ ├── ImportHookDefault.js │ │ │ ├── ImportHookDefault.res │ │ │ ├── ImportHooks.js │ │ │ ├── ImportHooks.res │ │ │ ├── ImportIndex.js │ │ │ ├── ImportIndex.res │ │ │ ├── ImportJsValue.js │ │ │ ├── ImportJsValue.res │ │ │ ├── ImportMyBanner.js │ │ │ ├── ImportMyBanner.res │ │ │ ├── JSResource.js │ │ │ ├── JSResource.res │ │ │ ├── LetPrivate.js │ │ │ ├── LetPrivate.res │ │ │ ├── ModuleAliases.js │ │ │ ├── ModuleAliases.res │ │ │ ├── ModuleAliases2.js │ │ │ ├── ModuleAliases2.res │ │ │ ├── ModuleExceptionBug.js │ │ │ ├── ModuleExceptionBug.res │ │ │ ├── NestedModules.js │ │ │ ├── NestedModules.res │ │ │ ├── NestedModulesInSignature.js │ │ │ ├── NestedModulesInSignature.res │ │ │ ├── NestedModulesInSignature.resi │ │ │ ├── Newsyntax.js │ │ │ ├── Newsyntax.res │ │ │ ├── Newton.js │ │ │ ├── Newton.res │ │ │ ├── Opaque.js │ │ │ ├── Opaque.res │ │ │ ├── OptArg.js │ │ │ ├── OptArg.res │ │ │ ├── OptArg.resi │ │ │ ├── P.js │ │ │ ├── P.res │ │ │ ├── Records.js │ │ │ ├── Records.res │ │ │ ├── References.js │ │ │ ├── References.res │ │ │ ├── RepeatedLabel.js │ │ │ ├── RepeatedLabel.res │ │ │ ├── RequireCond.js │ │ │ ├── RequireCond.res │ │ │ ├── Shadow.js │ │ │ ├── Shadow.res │ │ │ ├── TestDeadExn.js │ │ │ ├── TestDeadExn.res │ │ │ ├── TestEmitInnerModules.js │ │ │ ├── TestEmitInnerModules.res │ │ │ ├── TestFirstClassModules.js │ │ │ ├── TestFirstClassModules.res │ │ │ ├── TestImmutableArray.js │ │ │ ├── TestImmutableArray.res │ │ │ ├── TestImport.js │ │ │ ├── TestImport.res │ │ │ ├── TestModuleAliases.js │ │ │ ├── TestModuleAliases.res │ │ │ ├── TestOptArg.js │ │ │ ├── TestOptArg.res │ │ │ ├── TestPromise.js │ │ │ ├── TestPromise.res │ │ │ ├── ToSuppress.js │ │ │ ├── ToSuppress.res │ │ │ ├── TransitiveType1.js │ │ │ ├── TransitiveType1.res │ │ │ ├── TransitiveType2.js │ │ │ ├── TransitiveType2.res │ │ │ ├── TransitiveType3.js │ │ │ ├── TransitiveType3.res │ │ │ ├── Tuples.js │ │ │ ├── Tuples.res │ │ │ ├── TypeParams1.js │ │ │ ├── TypeParams1.res │ │ │ ├── TypeParams2.js │ │ │ ├── TypeParams2.res │ │ │ ├── TypeParams3.js │ │ │ ├── TypeParams3.res │ │ │ ├── Types.js │ │ │ ├── Types.res │ │ │ ├── Unboxed.js │ │ │ ├── Unboxed.res │ │ │ ├── Uncurried.js │ │ │ ├── Uncurried.res │ │ │ ├── Unison.js │ │ │ ├── Unison.res │ │ │ ├── UseImportJsValue.js │ │ │ ├── UseImportJsValue.res │ │ │ ├── Variants.js │ │ │ ├── Variants.res │ │ │ ├── VariantsWithPayload.js │ │ │ ├── VariantsWithPayload.res │ │ │ ├── arg_helper.js │ │ │ ├── arg_helper.res │ │ │ ├── ast_helper.js │ │ │ ├── ast_helper.res │ │ │ ├── asttypes.js │ │ │ ├── asttypes.res │ │ │ ├── clflags.js │ │ │ ├── clflags.res │ │ │ ├── config.js │ │ │ ├── config.res │ │ │ ├── exception/ │ │ │ │ ├── Arr.js │ │ │ │ ├── Arr.res │ │ │ │ ├── BeltTest.js │ │ │ │ ├── BeltTest.res │ │ │ │ ├── BsJson.js │ │ │ │ ├── BsJson.res │ │ │ │ ├── Exn.js │ │ │ │ ├── Exn.res │ │ │ │ ├── ExnA.js │ │ │ │ ├── ExnA.res │ │ │ │ ├── ExnB.js │ │ │ │ ├── ExnB.res │ │ │ │ ├── ExportWithRename.js │ │ │ │ ├── ExportWithRename.res │ │ │ │ ├── InnerModules.js │ │ │ │ ├── InnerModules.res │ │ │ │ ├── TestInnerModules.js │ │ │ │ ├── TestInnerModules.res │ │ │ │ ├── TestYojson.js │ │ │ │ ├── TestYojson.res │ │ │ │ ├── Yojson.js │ │ │ │ └── Yojson.res │ │ │ ├── format.js │ │ │ ├── format.res │ │ │ ├── identifiable.js │ │ │ ├── location.js │ │ │ ├── location.res │ │ │ ├── longident.js │ │ │ ├── longident.res │ │ │ ├── loop.js │ │ │ ├── loop.res │ │ │ ├── misc.js │ │ │ ├── misc.res │ │ │ ├── nativeint.js │ │ │ ├── nativeint.res │ │ │ ├── numbers.js │ │ │ ├── numbers.res │ │ │ ├── parsetree.js │ │ │ ├── parsetree.res │ │ │ ├── printf.js │ │ │ ├── printf.res │ │ │ ├── res_comment.js │ │ │ ├── res_comment.res │ │ │ ├── res_comments_table.js │ │ │ ├── res_comments_table.res │ │ │ ├── res_core.js │ │ │ ├── res_core.res │ │ │ ├── res_diagnostics.js │ │ │ ├── res_diagnostics.res │ │ │ ├── res_diagnostics_printing_utils.js │ │ │ ├── res_diagnostics_printing_utils.res │ │ │ ├── res_doc.js │ │ │ ├── res_doc.res │ │ │ ├── res_grammar.js │ │ │ ├── res_grammar.res │ │ │ ├── res_js_ffi.js │ │ │ ├── res_js_ffi.res │ │ │ ├── res_minibuffer.js │ │ │ ├── res_minibuffer.res │ │ │ ├── res_parens.js │ │ │ ├── res_parens.res │ │ │ ├── res_parser.js │ │ │ ├── res_parser.res │ │ │ ├── res_parsetree_viewer.js │ │ │ ├── res_parsetree_viewer.res │ │ │ ├── res_printer.js │ │ │ ├── res_printer.res │ │ │ ├── res_reporting.js │ │ │ ├── res_reporting.res │ │ │ ├── res_scanner.js │ │ │ ├── res_scanner.res │ │ │ ├── res_token.js │ │ │ ├── res_token.res │ │ │ ├── res_utf8.js │ │ │ ├── res_utf8.res │ │ │ ├── syntaxerr.js │ │ │ ├── syntaxerr.res │ │ │ ├── warnings.js │ │ │ └── warnings.res │ │ ├── monorepo-project/ │ │ │ ├── .gitignore │ │ │ ├── .vscode/ │ │ │ │ └── settings.json │ │ │ ├── package.json │ │ │ ├── packages/ │ │ │ │ └── app/ │ │ │ │ ├── .vscode/ │ │ │ │ │ └── settings.json │ │ │ │ ├── package.json │ │ │ │ ├── rescript.json │ │ │ │ └── src/ │ │ │ │ ├── App.mjs │ │ │ │ └── App.res │ │ │ ├── rescript.json │ │ │ └── src/ │ │ │ ├── Root.mjs │ │ │ └── Root.res │ │ ├── rescript9-project/ │ │ │ ├── .gitignore │ │ │ ├── .vscode/ │ │ │ │ └── settings.json │ │ │ ├── bsconfig.json │ │ │ ├── package.json │ │ │ └── src/ │ │ │ ├── Hello.bs.js │ │ │ └── Hello.res │ │ └── workspace-project/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── app/ │ │ │ ├── bsconfig.json │ │ │ ├── package.json │ │ │ └── src/ │ │ │ └── App.res │ │ ├── bsconfig.json │ │ ├── common/ │ │ │ ├── bsconfig.json │ │ │ ├── package.json │ │ │ └── src/ │ │ │ ├── Utils.mjs │ │ │ └── Utils.res │ │ ├── myplugin/ │ │ │ ├── bsconfig.json │ │ │ ├── package.json │ │ │ └── src/ │ │ │ ├── Promise.mjs │ │ │ └── Promise.res │ │ └── package.json │ ├── reanalyze/ │ │ ├── Makefile │ │ ├── dune │ │ ├── examples/ │ │ │ ├── .gitignore │ │ │ ├── deadcode/ │ │ │ │ ├── .gitignore │ │ │ │ ├── .watchmanconfig │ │ │ │ ├── Makefile │ │ │ │ ├── bsconfig.json │ │ │ │ ├── expected/ │ │ │ │ │ ├── deadcode.txt │ │ │ │ │ └── exception.txt │ │ │ │ ├── package.json │ │ │ │ ├── src/ │ │ │ │ │ ├── AutoAnnotate.bs.js │ │ │ │ │ ├── AutoAnnotate.res │ │ │ │ │ ├── BootloaderResource.bs.js │ │ │ │ │ ├── BootloaderResource.res │ │ │ │ │ ├── BucklescriptAnnotations.bs.js │ │ │ │ │ ├── BucklescriptAnnotations.res │ │ │ │ │ ├── ComponentAsProp.bs.js │ │ │ │ │ ├── ComponentAsProp.res │ │ │ │ │ ├── CreateErrorHandler1.bs.js │ │ │ │ │ ├── CreateErrorHandler1.res │ │ │ │ │ ├── CreateErrorHandler2.bs.js │ │ │ │ │ ├── CreateErrorHandler2.res │ │ │ │ │ ├── DeadCodeImplementation.bs.js │ │ │ │ │ ├── DeadCodeImplementation.res │ │ │ │ │ ├── DeadCodeInterface.bs.js │ │ │ │ │ ├── DeadCodeInterface.res │ │ │ │ │ ├── DeadExn.bs.js │ │ │ │ │ ├── DeadExn.res │ │ │ │ │ ├── DeadExn.resi │ │ │ │ │ ├── DeadRT.bs.js │ │ │ │ │ ├── DeadRT.res │ │ │ │ │ ├── DeadRT.resi │ │ │ │ │ ├── DeadTest.bs.js │ │ │ │ │ ├── DeadTest.res │ │ │ │ │ ├── DeadTestBlacklist.bs.js │ │ │ │ │ ├── DeadTestBlacklist.res │ │ │ │ │ ├── DeadTestWithInterface.bs.js │ │ │ │ │ ├── DeadTestWithInterface.res │ │ │ │ │ ├── DeadTestWithInterface.resi │ │ │ │ │ ├── DeadTypeTest.bs.js │ │ │ │ │ ├── DeadTypeTest.res │ │ │ │ │ ├── DeadTypeTest.resi │ │ │ │ │ ├── DeadValueTest.bs.js │ │ │ │ │ ├── DeadValueTest.res │ │ │ │ │ ├── DeadValueTest.resi │ │ │ │ │ ├── Docstrings.bs.js │ │ │ │ │ ├── Docstrings.res │ │ │ │ │ ├── DynamicallyLoadedComponent.bs.js │ │ │ │ │ ├── DynamicallyLoadedComponent.res │ │ │ │ │ ├── EmptyArray.bs.js │ │ │ │ │ ├── EmptyArray.res │ │ │ │ │ ├── ErrorHandler.bs.js │ │ │ │ │ ├── ErrorHandler.res │ │ │ │ │ ├── ErrorHandler.resi │ │ │ │ │ ├── EverythingLiveHere.bs.js │ │ │ │ │ ├── EverythingLiveHere.res │ │ │ │ │ ├── FC.bs.js │ │ │ │ │ ├── FC.res │ │ │ │ │ ├── FirstClassModules.bs.js │ │ │ │ │ ├── FirstClassModules.res │ │ │ │ │ ├── FirstClassModulesInterface.bs.js │ │ │ │ │ ├── FirstClassModulesInterface.res │ │ │ │ │ ├── FirstClassModulesInterface.resi │ │ │ │ │ ├── Hooks.bs.js │ │ │ │ │ ├── Hooks.res │ │ │ │ │ ├── IgnoreInterface.bs.js │ │ │ │ │ ├── IgnoreInterface.res │ │ │ │ │ ├── IgnoreInterface.resi │ │ │ │ │ ├── ImmutableArray.bs.js │ │ │ │ │ ├── ImmutableArray.res │ │ │ │ │ ├── ImmutableArray.resi │ │ │ │ │ ├── ImportHookDefault.bs.js │ │ │ │ │ ├── ImportHookDefault.res │ │ │ │ │ ├── ImportHooks.bs.js │ │ │ │ │ ├── ImportHooks.res │ │ │ │ │ ├── ImportIndex.bs.js │ │ │ │ │ ├── ImportIndex.res │ │ │ │ │ ├── ImportJsValue.bs.js │ │ │ │ │ ├── ImportJsValue.res │ │ │ │ │ ├── ImportMyBanner.bs.js │ │ │ │ │ ├── ImportMyBanner.res │ │ │ │ │ ├── InnerModuleTypes.bs.js │ │ │ │ │ ├── InnerModuleTypes.res │ │ │ │ │ ├── InnerModuleTypes.resi │ │ │ │ │ ├── JSResource.bs.js │ │ │ │ │ ├── JSResource.res │ │ │ │ │ ├── JsxV4.bs.js │ │ │ │ │ ├── JsxV4.res │ │ │ │ │ ├── LetPrivate.bs.js │ │ │ │ │ ├── LetPrivate.res │ │ │ │ │ ├── ModuleAliases.bs.js │ │ │ │ │ ├── ModuleAliases.res │ │ │ │ │ ├── ModuleAliases2.bs.js │ │ │ │ │ ├── ModuleAliases2.res │ │ │ │ │ ├── ModuleExceptionBug.bs.js │ │ │ │ │ ├── ModuleExceptionBug.res │ │ │ │ │ ├── NestedModules.bs.js │ │ │ │ │ ├── NestedModules.res │ │ │ │ │ ├── NestedModulesInSignature.bs.js │ │ │ │ │ ├── NestedModulesInSignature.res │ │ │ │ │ ├── NestedModulesInSignature.resi │ │ │ │ │ ├── Newsyntax.bs.js │ │ │ │ │ ├── Newsyntax.res │ │ │ │ │ ├── Newton.bs.js │ │ │ │ │ ├── Newton.res │ │ │ │ │ ├── Opaque.bs.js │ │ │ │ │ ├── Opaque.res │ │ │ │ │ ├── OptArg.bs.js │ │ │ │ │ ├── OptArg.res │ │ │ │ │ ├── OptArg.resi │ │ │ │ │ ├── Records.bs.js │ │ │ │ │ ├── Records.res │ │ │ │ │ ├── References.bs.js │ │ │ │ │ ├── References.res │ │ │ │ │ ├── RepeatedLabel.bs.js │ │ │ │ │ ├── RepeatedLabel.res │ │ │ │ │ ├── RequireCond.bs.js │ │ │ │ │ ├── RequireCond.res │ │ │ │ │ ├── Shadow.bs.js │ │ │ │ │ ├── Shadow.res │ │ │ │ │ ├── TestDeadExn.bs.js │ │ │ │ │ ├── TestDeadExn.res │ │ │ │ │ ├── TestEmitInnerModules.bs.js │ │ │ │ │ ├── TestEmitInnerModules.res │ │ │ │ │ ├── TestFirstClassModules.bs.js │ │ │ │ │ ├── TestFirstClassModules.res │ │ │ │ │ ├── TestImmutableArray.bs.js │ │ │ │ │ ├── TestImmutableArray.res │ │ │ │ │ ├── TestImport.bs.js │ │ │ │ │ ├── TestImport.res │ │ │ │ │ ├── TestInnedModuleTypes.bs.js │ │ │ │ │ ├── TestInnedModuleTypes.res │ │ │ │ │ ├── TestModuleAliases.bs.js │ │ │ │ │ ├── TestModuleAliases.res │ │ │ │ │ ├── TestOptArg.bs.js │ │ │ │ │ ├── TestOptArg.res │ │ │ │ │ ├── TestPromise.bs.js │ │ │ │ │ ├── TestPromise.res │ │ │ │ │ ├── ToSuppress.bs.js │ │ │ │ │ ├── ToSuppress.res │ │ │ │ │ ├── TransitiveType1.bs.js │ │ │ │ │ ├── TransitiveType1.res │ │ │ │ │ ├── TransitiveType2.bs.js │ │ │ │ │ ├── TransitiveType2.res │ │ │ │ │ ├── TransitiveType3.bs.js │ │ │ │ │ ├── TransitiveType3.res │ │ │ │ │ ├── Tuples.bs.js │ │ │ │ │ ├── Tuples.res │ │ │ │ │ ├── TypeParams1.bs.js │ │ │ │ │ ├── TypeParams1.res │ │ │ │ │ ├── TypeParams2.bs.js │ │ │ │ │ ├── TypeParams2.res │ │ │ │ │ ├── TypeParams3.bs.js │ │ │ │ │ ├── TypeParams3.res │ │ │ │ │ ├── Types.bs.js │ │ │ │ │ ├── Types.res │ │ │ │ │ ├── Unboxed.bs.js │ │ │ │ │ ├── Unboxed.res │ │ │ │ │ ├── Uncurried.bs.js │ │ │ │ │ ├── Uncurried.res │ │ │ │ │ ├── Unison.bs.js │ │ │ │ │ ├── Unison.res │ │ │ │ │ ├── UseImportJsValue.bs.js │ │ │ │ │ ├── UseImportJsValue.res │ │ │ │ │ ├── Variants.bs.js │ │ │ │ │ ├── Variants.res │ │ │ │ │ ├── VariantsWithPayload.bs.js │ │ │ │ │ ├── VariantsWithPayload.res │ │ │ │ │ ├── exception/ │ │ │ │ │ │ ├── Arr.bs.js │ │ │ │ │ │ ├── Arr.res │ │ │ │ │ │ ├── BeltTest.bs.js │ │ │ │ │ │ ├── BeltTest.res │ │ │ │ │ │ ├── BsJson.bs.js │ │ │ │ │ │ ├── BsJson.res │ │ │ │ │ │ ├── Exn.bs.js │ │ │ │ │ │ ├── Exn.res │ │ │ │ │ │ ├── ExnA.bs.js │ │ │ │ │ │ ├── ExnA.res │ │ │ │ │ │ ├── ExnB.bs.js │ │ │ │ │ │ ├── ExnB.res │ │ │ │ │ │ ├── ExportWithRename.bs.js │ │ │ │ │ │ ├── ExportWithRename.res │ │ │ │ │ │ ├── InnerModules.bs.js │ │ │ │ │ │ ├── InnerModules.res │ │ │ │ │ │ ├── TestInnerModules.bs.js │ │ │ │ │ │ ├── TestInnerModules.res │ │ │ │ │ │ ├── TestYojson.bs.js │ │ │ │ │ │ ├── TestYojson.res │ │ │ │ │ │ ├── Yojson.bs.js │ │ │ │ │ │ └── Yojson.res │ │ │ │ │ ├── exportNestedValues.js │ │ │ │ │ └── trace.bs.js │ │ │ │ └── test.sh │ │ │ └── termination/ │ │ │ ├── .gitignore │ │ │ ├── .watchmanconfig │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── bsconfig.json │ │ │ ├── expected/ │ │ │ │ └── termination.txt │ │ │ ├── package.json │ │ │ ├── src/ │ │ │ │ ├── TestCyberTruck.bs.js │ │ │ │ └── TestCyberTruck.res │ │ │ └── test.sh │ │ └── src/ │ │ ├── Annotation.ml │ │ ├── Arnold.ml │ │ ├── Common.ml │ │ ├── DeadCode.ml │ │ ├── DeadCommon.ml │ │ ├── DeadException.ml │ │ ├── DeadModules.ml │ │ ├── DeadOptionalArgs.ml │ │ ├── DeadType.ml │ │ ├── DeadValue.ml │ │ ├── EmitJson.ml │ │ ├── Exception.ml │ │ ├── Exceptions.ml │ │ ├── Exn.ml │ │ ├── Exn.mli │ │ ├── ExnLib.ml │ │ ├── FindSourceFile.ml │ │ ├── Issues.ml │ │ ├── Log_.ml │ │ ├── ModulePath.ml │ │ ├── Name.ml │ │ ├── Name.mli │ │ ├── Paths.ml │ │ ├── Reanalyze.ml │ │ ├── RunConfig.ml │ │ ├── SideEffects.ml │ │ ├── Suppress.ml │ │ ├── Version.ml │ │ ├── WriteDeadAnnotations.ml │ │ └── dune │ ├── src/ │ │ ├── BuildSystem.ml │ │ ├── Cache.ml │ │ ├── Cfg.ml │ │ ├── Cmt.ml │ │ ├── CodeActions.ml │ │ ├── Codemod.ml │ │ ├── Commands.ml │ │ ├── CompletionBackEnd.ml │ │ ├── CompletionDecorators.ml │ │ ├── CompletionExpressions.ml │ │ ├── CompletionFrontEnd.ml │ │ ├── CompletionJsx.ml │ │ ├── CompletionPatterns.ml │ │ ├── Completions.ml │ │ ├── CreateInterface.ml │ │ ├── DceCommand.ml │ │ ├── Debug.ml │ │ ├── Diagnostics.ml │ │ ├── DocumentSymbol.ml │ │ ├── DotCompletionUtils.ml │ │ ├── DumpAst.ml │ │ ├── Files.ml │ │ ├── FindFiles.ml │ │ ├── Hint.ml │ │ ├── Hover.ml │ │ ├── JsxHacks.ml │ │ ├── Loc.ml │ │ ├── LocalTables.ml │ │ ├── Log.ml │ │ ├── Markdown.ml │ │ ├── ModuleResolution.ml │ │ ├── Packages.ml │ │ ├── PipeCompletionUtils.ml │ │ ├── Pos.ml │ │ ├── PrintType.ml │ │ ├── ProcessAttributes.ml │ │ ├── ProcessCmt.ml │ │ ├── ProcessExtra.ml │ │ ├── Protocol.ml │ │ ├── Range.ml │ │ ├── References.ml │ │ ├── ResolvePath.ml │ │ ├── Scope.ml │ │ ├── SemanticTokens.ml │ │ ├── Shared.ml │ │ ├── SharedTypes.ml │ │ ├── SignatureHelp.ml │ │ ├── TypeUtils.ml │ │ ├── Uri.ml │ │ ├── Uri.mli │ │ ├── Utils.ml │ │ ├── Xform.ml │ │ └── dune │ ├── tests/ │ │ ├── Makefile │ │ ├── bsconfig.json │ │ ├── not_compiled/ │ │ │ ├── Diagnostics.res │ │ │ ├── DocTemplate.res │ │ │ ├── DocTemplate.resi │ │ │ └── expected/ │ │ │ ├── Diagnostics.res.txt │ │ │ ├── DocTemplate.res.txt │ │ │ └── DocTemplate.resi.txt │ │ ├── package.json │ │ ├── src/ │ │ │ ├── Auto.res │ │ │ ├── BrokenParserCases.res │ │ │ ├── CodeLens.res │ │ │ ├── Codemod.res │ │ │ ├── CompletableComponent.res │ │ │ ├── CompletePrioritize1.res │ │ │ ├── CompletePrioritize2.res │ │ │ ├── Completion.res │ │ │ ├── CompletionAttributes.res │ │ │ ├── CompletionDicts.res │ │ │ ├── CompletionExpressions.res │ │ │ ├── CompletionFromModule.res │ │ │ ├── CompletionFromModule2.res │ │ │ ├── CompletionFunctionArguments.res │ │ │ ├── CompletionInferValues.res │ │ │ ├── CompletionJsx.res │ │ │ ├── CompletionJsxProps.res │ │ │ ├── CompletionMultipleEditorCompleteFrom.res │ │ │ ├── CompletionObjects.res │ │ │ ├── CompletionPattern.res │ │ │ ├── CompletionPipeChain.res │ │ │ ├── CompletionPipeProperty.res │ │ │ ├── CompletionPipeSubmodules.res │ │ │ ├── CompletionResolve.res │ │ │ ├── CompletionSupport.res │ │ │ ├── CompletionSupport2.res │ │ │ ├── CompletionTypeAnnotation.res │ │ │ ├── CompletionTypeT.res │ │ │ ├── Component.res │ │ │ ├── Component.resi │ │ │ ├── CreateInterface.res │ │ │ ├── Cross.res │ │ │ ├── Dce.res │ │ │ ├── Debug.res │ │ │ ├── Definition.res │ │ │ ├── DefinitionWithInterface.res │ │ │ ├── DefinitionWithInterface.resi │ │ │ ├── Destructuring.res │ │ │ ├── Div.res │ │ │ ├── DocComments.res │ │ │ ├── DocumentSymbol.res │ │ │ ├── DotPipeCompletionSpec.res │ │ │ ├── EnvCompletion.res │ │ │ ├── EnvCompletionOtherFile.res │ │ │ ├── ExhaustiveSwitch.res │ │ │ ├── Firebase.res │ │ │ ├── Fragment.res │ │ │ ├── Highlight.res │ │ │ ├── Hover.res │ │ │ ├── InlayHint.res │ │ │ ├── Jsx2.res │ │ │ ├── Jsx2.resi │ │ │ ├── JsxV4.res │ │ │ ├── LongIdentTest.res │ │ │ ├── ModuleStuff.res │ │ │ ├── Objects.res │ │ │ ├── Patterns.res │ │ │ ├── PolyRec.res │ │ │ ├── QueryFile.res │ │ │ ├── RecModules.res │ │ │ ├── RecordCompletion.res │ │ │ ├── RecoveryOnProp.res │ │ │ ├── References.res │ │ │ ├── ReferencesWithInterface.res │ │ │ ├── ReferencesWithInterface.resi │ │ │ ├── Rename.res │ │ │ ├── RenameWithInterface.res │ │ │ ├── RenameWithInterface.resi │ │ │ ├── Reprod.res │ │ │ ├── Rxjs.res │ │ │ ├── RxjsCompletion.res │ │ │ ├── SchemaAssets.res │ │ │ ├── ShadowedBelt.res │ │ │ ├── SignatureHelp.res │ │ │ ├── Support.res │ │ │ ├── TableclothMap.res │ │ │ ├── TableclothMap.resi │ │ │ ├── TypeArgCtx.res │ │ │ ├── TypeAtPosCompletion.res │ │ │ ├── TypeDefinition.res │ │ │ ├── Xform.res │ │ │ ├── dce/ │ │ │ │ └── DceTest.res │ │ │ ├── expected/ │ │ │ │ ├── Auto.res.txt │ │ │ │ ├── BrokenParserCases.res.txt │ │ │ │ ├── CodeLens.res.txt │ │ │ │ ├── Codemod.res.txt │ │ │ │ ├── CompletableComponent.res.txt │ │ │ │ ├── CompletePrioritize1.res.txt │ │ │ │ ├── CompletePrioritize2.res.txt │ │ │ │ ├── Completion.res.txt │ │ │ │ ├── CompletionAttributes.res.txt │ │ │ │ ├── CompletionDicts.res.txt │ │ │ │ ├── CompletionExpressions.res.txt │ │ │ │ ├── CompletionFromModule.res.txt │ │ │ │ ├── CompletionFromModule2.res.txt │ │ │ │ ├── CompletionFunctionArguments.res.txt │ │ │ │ ├── CompletionInferValues.res.txt │ │ │ │ ├── CompletionJsx.res.txt │ │ │ │ ├── CompletionJsxProps.res.txt │ │ │ │ ├── CompletionMultipleEditorCompleteFrom.res.txt │ │ │ │ ├── CompletionObjects.res.txt │ │ │ │ ├── CompletionPattern.res.txt │ │ │ │ ├── CompletionPipeChain.res.txt │ │ │ │ ├── CompletionPipeProperty.res.txt │ │ │ │ ├── CompletionPipeSubmodules.res.txt │ │ │ │ ├── CompletionResolve.res.txt │ │ │ │ ├── CompletionSupport.res.txt │ │ │ │ ├── CompletionSupport2.res.txt │ │ │ │ ├── CompletionTypeAnnotation.res.txt │ │ │ │ ├── CompletionTypeT.res.txt │ │ │ │ ├── Component.res.txt │ │ │ │ ├── Component.resi.txt │ │ │ │ ├── CreateInterface.res.txt │ │ │ │ ├── Cross.res.txt │ │ │ │ ├── Dce.res.txt │ │ │ │ ├── Debug.res.txt │ │ │ │ ├── Definition.res.txt │ │ │ │ ├── DefinitionWithInterface.res.txt │ │ │ │ ├── DefinitionWithInterface.resi.txt │ │ │ │ ├── Destructuring.res.txt │ │ │ │ ├── Div.res.txt │ │ │ │ ├── DocComments.res.txt │ │ │ │ ├── DocExtraction2.res.txt │ │ │ │ ├── DocExtraction2.resi.txt │ │ │ │ ├── DocExtractionRes.res.txt │ │ │ │ ├── DocumentSymbol.res.txt │ │ │ │ ├── DotPipeCompletionSpec.res.txt │ │ │ │ ├── EnvCompletion.res.txt │ │ │ │ ├── EnvCompletionOtherFile.res.txt │ │ │ │ ├── ExhaustiveSwitch.res.txt │ │ │ │ ├── Firebase.res.txt │ │ │ │ ├── Fragment.res.txt │ │ │ │ ├── Highlight.res.txt │ │ │ │ ├── Hover.res.txt │ │ │ │ ├── InlayHint.res.txt │ │ │ │ ├── Jsx2.res.txt │ │ │ │ ├── Jsx2.resi.txt │ │ │ │ ├── JsxV4.res.txt │ │ │ │ ├── LongIdentTest.res.txt │ │ │ │ ├── ModuleStuff.res.txt │ │ │ │ ├── Objects.res.txt │ │ │ │ ├── Patterns.res.txt │ │ │ │ ├── PolyRec.res.txt │ │ │ │ ├── QueryFile.res.txt │ │ │ │ ├── RecModules.res.txt │ │ │ │ ├── RecordCompletion.res.txt │ │ │ │ ├── RecoveryOnProp.res.txt │ │ │ │ ├── References.res.txt │ │ │ │ ├── ReferencesWithInterface.res.txt │ │ │ │ ├── ReferencesWithInterface.resi.txt │ │ │ │ ├── Rename.res.txt │ │ │ │ ├── RenameWithInterface.res.txt │ │ │ │ ├── RenameWithInterface.resi.txt │ │ │ │ ├── Reprod.res.txt │ │ │ │ ├── Rxjs.res.txt │ │ │ │ ├── RxjsCompletion.res.txt │ │ │ │ ├── SchemaAssets.res.txt │ │ │ │ ├── ShadowedBelt.res.txt │ │ │ │ ├── SignatureHelp.res.txt │ │ │ │ ├── Support.res.txt │ │ │ │ ├── TableclothMap.res.txt │ │ │ │ ├── TableclothMap.resi.txt │ │ │ │ ├── TypeArgCtx.res.txt │ │ │ │ ├── TypeAtPosCompletion.res.txt │ │ │ │ ├── TypeDefinition.res.txt │ │ │ │ └── Xform.res.txt │ │ │ ├── inner/ │ │ │ │ ├── ComponentInner.res │ │ │ │ ├── ComponentInner.resi │ │ │ │ ├── ReferencesInner.res │ │ │ │ └── ReferencesInner.resi │ │ │ ├── test.json │ │ │ └── tst.js │ │ └── test.sh │ ├── tests-generic-jsx-transform/ │ │ ├── Makefile │ │ ├── package.json │ │ ├── rescript.json │ │ ├── src/ │ │ │ ├── GenericJsx.res │ │ │ ├── GenericJsxCompletion.res │ │ │ └── expected/ │ │ │ ├── GenericJsx.res.txt │ │ │ └── GenericJsxCompletion.res.txt │ │ └── test.sh │ ├── tests-incremental-typechecking/ │ │ ├── Makefile │ │ ├── package.json │ │ ├── rescript.json │ │ ├── src/ │ │ │ ├── ConstructorCompletion__Json.res │ │ │ ├── ConstructorCompletion__Own.res │ │ │ └── expected/ │ │ │ ├── ConstructorCompletion__Json.res.txt │ │ │ └── ConstructorCompletion__Own.res.txt │ │ └── test.sh │ └── vendor/ │ ├── dune │ ├── ext/ │ │ ├── README.md │ │ ├── bs_hash_stubs.ml │ │ ├── bsb_db.ml │ │ ├── bsb_db.mli │ │ ├── bsc_args.ml │ │ ├── bsc_args.mli │ │ ├── bsc_warnings.ml │ │ ├── config.ml │ │ ├── config.mli │ │ ├── dune │ │ ├── encoding.md │ │ ├── ext_array.ml │ │ ├── ext_array.mli │ │ ├── ext_basic_hash_stubs.c │ │ ├── ext_buffer.ml │ │ ├── ext_buffer.mli │ │ ├── ext_bytes.ml │ │ ├── ext_bytes.mli │ │ ├── ext_char.ml │ │ ├── ext_char.mli │ │ ├── ext_cmp.ml │ │ ├── ext_cmp.mli │ │ ├── ext_color.ml │ │ ├── ext_color.mli │ │ ├── ext_digest.ml │ │ ├── ext_digest.mli │ │ ├── ext_file_extensions.ml │ │ ├── ext_filename.ml │ │ ├── ext_filename.mli │ │ ├── ext_fmt.ml │ │ ├── ext_format.ml │ │ ├── ext_format.mli │ │ ├── ext_ident.ml │ │ ├── ext_ident.mli │ │ ├── ext_int.ml │ │ ├── ext_int.mli │ │ ├── ext_io.ml │ │ ├── ext_io.mli │ │ ├── ext_js_file_kind.ml │ │ ├── ext_js_regex.ml │ │ ├── ext_js_regex.mli │ │ ├── ext_json.ml │ │ ├── ext_json.mli │ │ ├── ext_json_noloc.ml │ │ ├── ext_json_noloc.mli │ │ ├── ext_json_parse.mli │ │ ├── ext_json_parse.mll │ │ ├── ext_json_types.ml │ │ ├── ext_list.ml │ │ ├── ext_list.mli │ │ ├── ext_marshal.ml │ │ ├── ext_marshal.mli │ │ ├── ext_module_system.ml │ │ ├── ext_modulename.ml │ │ ├── ext_modulename.mli │ │ ├── ext_namespace.ml │ │ ├── ext_namespace.mli │ │ ├── ext_namespace_encode.ml │ │ ├── ext_namespace_encode.mli │ │ ├── ext_obj.ml │ │ ├── ext_obj.mli │ │ ├── ext_option.ml │ │ ├── ext_option.mli │ │ ├── ext_path.ml │ │ ├── ext_path.mli │ │ ├── ext_pervasives.ml │ │ ├── ext_pervasives.mli │ │ ├── ext_position.ml │ │ ├── ext_position.mli │ │ ├── ext_pp.ml │ │ ├── ext_pp.mli │ │ ├── ext_pp_scope.ml │ │ ├── ext_pp_scope.mli │ │ ├── ext_ref.ml │ │ ├── ext_ref.mli │ │ ├── ext_scc.ml │ │ ├── ext_scc.mli │ │ ├── ext_spec.ml │ │ ├── ext_spec.mli │ │ ├── ext_string.ml │ │ ├── ext_string.mli │ │ ├── ext_string_array.ml │ │ ├── ext_string_array.mli │ │ ├── ext_sys.ml │ │ ├── ext_sys.mli │ │ ├── ext_topsort.ml │ │ ├── ext_topsort.mli │ │ ├── ext_utf8.ml │ │ ├── ext_utf8.mli │ │ ├── ext_util.ml │ │ ├── ext_util.mli │ │ ├── hash.cppo.ml │ │ ├── hash.mli │ │ ├── hash_gen.ml │ │ ├── hash_ident.mli │ │ ├── hash_int.mli │ │ ├── hash_set.cppo.ml │ │ ├── hash_set.mli │ │ ├── hash_set_gen.ml │ │ ├── hash_set_ident.mli │ │ ├── hash_set_ident_mask.ml │ │ ├── hash_set_ident_mask.mli │ │ ├── hash_set_int.mli │ │ ├── hash_set_poly.mli │ │ ├── hash_set_string.mli │ │ ├── hash_string.mli │ │ ├── ident.ml │ │ ├── ident.mli │ │ ├── identifiable.ml │ │ ├── identifiable.mli │ │ ├── int_vec_util.ml │ │ ├── int_vec_util.mli │ │ ├── int_vec_vec.ml │ │ ├── int_vec_vec.mli │ │ ├── js_reserved_map.ml │ │ ├── js_reserved_map.mli │ │ ├── js_runtime_modules.ml │ │ ├── literals.ml │ │ ├── map.cppo.ml │ │ ├── map_gen.ml │ │ ├── map_gen.mli │ │ ├── map_ident.mli │ │ ├── map_int.mli │ │ ├── map_string.mli │ │ ├── misc.ml │ │ ├── misc.mli │ │ ├── ordered_hash_map.cppo.ml │ │ ├── ordered_hash_map_gen.ml │ │ ├── ordered_hash_map_local_ident.mli │ │ ├── set.cppo.ml │ │ ├── set_gen.ml │ │ ├── set_gen.mli │ │ ├── set_ident.mli │ │ ├── set_int.mli │ │ ├── set_string.mli │ │ ├── union_find.ml │ │ ├── union_find.mli │ │ ├── vec.cppo.ml │ │ ├── vec.mli │ │ ├── vec_gen.ml │ │ ├── vec_int.mli │ │ ├── warnings.ml │ │ └── warnings.mli │ ├── js_parser/ │ │ ├── comment_attachment.ml │ │ ├── declaration_parser.ml │ │ ├── dune │ │ ├── enum_common.ml │ │ ├── enum_parser.ml │ │ ├── expression_parser.ml │ │ ├── file_key.ml │ │ ├── flow_LICENSE │ │ ├── flow_ast.ml │ │ ├── flow_ast_mapper.ml │ │ ├── flow_ast_utils.ml │ │ ├── flow_ast_utils.mli │ │ ├── flow_lexer.ml │ │ ├── flow_lexer.mli │ │ ├── flow_sedlexing.ml │ │ ├── flow_sedlexing.mli │ │ ├── js_id.ml │ │ ├── js_id.mli │ │ ├── js_id_unicode.ml │ │ ├── jsx_parser.ml │ │ ├── lex_env.ml │ │ ├── lex_result.ml │ │ ├── loc.ml │ │ ├── loc.mli │ │ ├── object_parser.ml │ │ ├── parse_error.ml │ │ ├── parser_common.ml │ │ ├── parser_env.ml │ │ ├── parser_env.mli │ │ ├── parser_flow.ml │ │ ├── pattern_cover.ml │ │ ├── pattern_parser.ml │ │ ├── primitive_deriving.ml │ │ ├── sedlex_LICENSE │ │ ├── statement_parser.ml │ │ ├── token.ml │ │ ├── type_parser.ml │ │ ├── wtf8.ml │ │ └── wtf8.mli │ ├── json/ │ │ ├── Json.ml │ │ └── dune │ ├── ml/ │ │ ├── annot.ml │ │ ├── ast_async.ml │ │ ├── ast_await.ml │ │ ├── ast_helper.ml │ │ ├── ast_helper.mli │ │ ├── ast_invariants.ml │ │ ├── ast_invariants.mli │ │ ├── ast_iterator.ml │ │ ├── ast_iterator.mli │ │ ├── ast_mapper.ml │ │ ├── ast_mapper.mli │ │ ├── ast_payload.ml │ │ ├── ast_payload.mli │ │ ├── ast_uncurried.ml │ │ ├── ast_uncurried_utils.ml │ │ ├── ast_untagged_variants.ml │ │ ├── asttypes.ml │ │ ├── bigint_utils.ml │ │ ├── bigint_utils.mli │ │ ├── bs_flow_ast_utils.ml │ │ ├── bs_flow_ast_utils.mli │ │ ├── btype.ml │ │ ├── btype.mli │ │ ├── builtin_attributes.ml │ │ ├── builtin_attributes.mli │ │ ├── ccomp.ml │ │ ├── ccomp.mli │ │ ├── classify_function.ml │ │ ├── classify_function.mli │ │ ├── clflags.ml │ │ ├── clflags.mli │ │ ├── cmi_format.ml │ │ ├── cmi_format.mli │ │ ├── cmt_format.ml │ │ ├── cmt_format.mli │ │ ├── code_frame.ml │ │ ├── consistbl.ml │ │ ├── consistbl.mli │ │ ├── ctype.ml │ │ ├── ctype.mli │ │ ├── datarepr.ml │ │ ├── datarepr.mli │ │ ├── delayed_checks.ml │ │ ├── delayed_checks.mli │ │ ├── depend.ml │ │ ├── depend.mli │ │ ├── docstrings.ml │ │ ├── docstrings.mli │ │ ├── dune │ │ ├── env.ml │ │ ├── env.mli │ │ ├── envaux.ml │ │ ├── envaux.mli │ │ ├── error_message_utils.ml │ │ ├── includeclass.ml │ │ ├── includeclass.mli │ │ ├── includecore.ml │ │ ├── includecore.mli │ │ ├── includemod.ml │ │ ├── includemod.mli │ │ ├── js_raw_info.ml │ │ ├── lambda.ml │ │ ├── lambda.mli │ │ ├── lexer.mli │ │ ├── lexer.mll │ │ ├── location.ml │ │ ├── location.mli │ │ ├── longident.ml │ │ ├── longident.mli │ │ ├── matching.ml │ │ ├── matching.mli │ │ ├── mtype.ml │ │ ├── mtype.mli │ │ ├── oprint.ml │ │ ├── oprint.mli │ │ ├── outcometree.ml │ │ ├── parmatch.ml │ │ ├── parmatch.mli │ │ ├── parse.ml │ │ ├── parse.mli │ │ ├── parser.ml │ │ ├── parser.mli │ │ ├── parser.mly │ │ ├── parsetree.ml │ │ ├── path.ml │ │ ├── path.mli │ │ ├── pprintast.ml │ │ ├── pprintast.mli │ │ ├── predef.ml │ │ ├── predef.mli │ │ ├── primitive.ml │ │ ├── primitive.mli │ │ ├── printast.ml │ │ ├── printast.mli │ │ ├── printlambda.ml │ │ ├── printlambda.mli │ │ ├── printtyp.ml │ │ ├── printtyp.mli │ │ ├── printtyped.ml │ │ ├── printtyped.mli │ │ ├── rec_check.ml │ │ ├── rec_check.mli │ │ ├── record_coercion.ml │ │ ├── record_type_spread.ml │ │ ├── rescript_cpp.ml │ │ ├── rescript_cpp.mli │ │ ├── stypes.ml │ │ ├── stypes.mli │ │ ├── subst.ml │ │ ├── subst.mli │ │ ├── switch.ml │ │ ├── switch.mli │ │ ├── syntaxerr.ml │ │ ├── syntaxerr.mli │ │ ├── tast_iterator.ml │ │ ├── tast_iterator.mli │ │ ├── tast_mapper.ml │ │ ├── tast_mapper.mli │ │ ├── tbl.ml │ │ ├── tbl.mli │ │ ├── terminfo.ml │ │ ├── terminfo.mli │ │ ├── transl_recmodule.ml │ │ ├── transl_recmodule.mli │ │ ├── translattribute.ml │ │ ├── translattribute.mli │ │ ├── translcore.ml │ │ ├── translcore.mli │ │ ├── translmod.ml │ │ ├── translmod.mli │ │ ├── typeclass.ml │ │ ├── typeclass.mli │ │ ├── typecore.ml │ │ ├── typecore.mli │ │ ├── typedecl.ml │ │ ├── typedecl.mli │ │ ├── typedtree.ml │ │ ├── typedtree.mli │ │ ├── typedtreeIter.ml │ │ ├── typedtreeIter.mli │ │ ├── typedtreeMap.ml │ │ ├── typedtreeMap.mli │ │ ├── typemod.ml │ │ ├── typemod.mli │ │ ├── typeopt.ml │ │ ├── typeopt.mli │ │ ├── types.ml │ │ ├── types.mli │ │ ├── typetexp.ml │ │ ├── typetexp.mli │ │ ├── untypeast.ml │ │ ├── untypeast.mli │ │ ├── variant_coercion.ml │ │ └── variant_type_spread.ml │ └── res_syntax/ │ ├── dune │ ├── jsx_common.ml │ ├── jsx_ppx.ml │ ├── jsx_ppx.mli │ ├── jsx_v4.ml │ ├── reactjs_jsx_v3.ml │ ├── res_ast_conversion.ml │ ├── res_ast_conversion.mli │ ├── res_ast_debugger.ml │ ├── res_ast_debugger.mli │ ├── res_cli.ml │ ├── res_comment.ml │ ├── res_comment.mli │ ├── res_comments_table.ml │ ├── res_core.ml │ ├── res_core.mli │ ├── res_diagnostics.ml │ ├── res_diagnostics.mli │ ├── res_doc.ml │ ├── res_doc.mli │ ├── res_driver.ml │ ├── res_driver.mli │ ├── res_driver_binary.ml │ ├── res_driver_binary.mli │ ├── res_driver_ml_parser.ml │ ├── res_driver_ml_parser.mli │ ├── res_grammar.ml │ ├── res_io.ml │ ├── res_io.mli │ ├── res_minibuffer.ml │ ├── res_minibuffer.mli │ ├── res_multi_printer.ml │ ├── res_multi_printer.mli │ ├── res_outcome_printer.ml │ ├── res_outcome_printer.mli │ ├── res_parens.ml │ ├── res_parens.mli │ ├── res_parser.ml │ ├── res_parser.mli │ ├── res_parsetree_viewer.ml │ ├── res_parsetree_viewer.mli │ ├── res_printer.ml │ ├── res_printer.mli │ ├── res_reporting.ml │ ├── res_scanner.ml │ ├── res_scanner.mli │ ├── res_string.ml │ ├── res_token.ml │ ├── res_uncurried.ml │ ├── res_utf8.ml │ └── res_utf8.mli ├── analysis.opam ├── client/ │ ├── .vscode-test.mjs │ ├── package.json │ ├── src/ │ │ ├── commands/ │ │ │ ├── code_analysis.ts │ │ │ ├── create_interface.ts │ │ │ ├── dump_debug.ts │ │ │ ├── open_compiled.ts │ │ │ ├── paste_as_rescript_json.ts │ │ │ ├── paste_as_rescript_jsx.ts │ │ │ ├── switch_impl_intf.ts │ │ │ └── transform-jsx.ts │ │ ├── commands.ts │ │ ├── extension.ts │ │ ├── test/ │ │ │ └── suite/ │ │ │ ├── exampleProject.test.ts │ │ │ ├── helpers.ts │ │ │ ├── monorepoRoot.test.ts │ │ │ ├── monorepoSubpackage.test.ts │ │ │ └── rescript9.test.ts │ │ └── utils.ts │ └── tsconfig.json ├── dune-project ├── grammars/ │ ├── rescript.markdown.json │ └── rescript.tmLanguage.json ├── package.json ├── rescript.configuration.json ├── scripts/ │ ├── find-runtime.ts │ ├── updateVersion.js │ └── verify-package.mjs ├── server/ │ ├── README.md │ ├── analysis_binaries/ │ │ └── README.md │ ├── config.md │ ├── package.json │ ├── src/ │ │ ├── bsc-args/ │ │ │ ├── bsb.ts │ │ │ └── rewatch.ts │ │ ├── buildSchema.ts │ │ ├── cli.ts │ │ ├── codeActions.ts │ │ ├── config.ts │ │ ├── constants.ts │ │ ├── errorReporter.ts │ │ ├── find-runtime.ts │ │ ├── incrementalCompilation.ts │ │ ├── logger.ts │ │ ├── lookup.ts │ │ ├── projectFiles.ts │ │ ├── server.ts │ │ └── utils.ts │ └── tsconfig.json ├── shared/ │ ├── src/ │ │ ├── findBinary.ts │ │ └── projectRoots.ts │ └── tsconfig.json ├── snippets.json ├── tools/ │ ├── CHANGELOG.md │ ├── README.md │ ├── bin/ │ │ ├── dune │ │ ├── main.ml │ │ └── version.ml │ ├── binaries/ │ │ └── .gitkeep │ ├── npm/ │ │ ├── RescriptTools.res │ │ ├── Tools_Docgen.res │ │ ├── Tools_Docgen.resi │ │ ├── cli.js │ │ └── getBinaryPath.js │ ├── package.json │ ├── rescript.json │ ├── src/ │ │ ├── dune │ │ └── tools.ml │ └── tests/ │ ├── Makefile │ ├── package.json │ ├── rescript.json │ ├── src/ │ │ ├── DocExtraction2.res │ │ ├── DocExtraction2.resi │ │ ├── DocExtractionRes.res │ │ ├── ModC.res │ │ ├── ModC.resi │ │ └── expected/ │ │ ├── DocExtraction2.res.json │ │ ├── DocExtraction2.resi.json │ │ ├── DocExtractionRes.res.json │ │ ├── ModC.res.json │ │ └── ModC.resi.json │ └── test.sh ├── tools.opam └── tsconfig.json
SYMBOL INDEX (1530 symbols across 168 files)
FILE: analysis/examples/example-project/src/Hello.res.js
function transform (line 47) | function transform(x, y) {
function div (line 68) | function div(x, y, children, param) {
function something (line 77) | function something(animal) {
function someFunction (line 81) | function someFunction(memorableName, param) {
function thing (line 103) | function thing() {
FILE: analysis/examples/example-project/src/Json.res.js
function string_of_number (line 8) | function string_of_number(f) {
function $pipe$bang (line 17) | function $pipe$bang(o, d) {
function $pipe$question (line 25) | function $pipe$question(o, d) {
function $pipe$question$great (line 33) | function $pipe$question$great(o, fn) {
function $pipe$question$great$great (line 39) | function $pipe$question$great$great(o, fn) {
function fold (line 45) | function fold(o, d, f) {
function escape (line 61) | function escape(text) {
function stringify (line 108) | function stringify(t) {
function white (line 158) | function white(n) {
function stringifyPretty (line 173) | function stringifyPretty(indentOpt, t) {
function unwrap (line 220) | function unwrap(message, t) {
function split_by (line 228) | function split_by(keep_emptyOpt, is_delim, str) {
function fail (line 269) | function fail(text, pos, message) {
function skipToNewline (line 279) | function skipToNewline(text, _pos) {
function stringTail (line 293) | function stringTail(text) {
function skipToCloseMultilineComment (line 302) | function skipToCloseMultilineComment(text, _pos) {
function skipWhite (line 316) | function skipWhite(text, _pos) {
function parseString (line 327) | function parseString(text, pos) {
function parseDigits (line 385) | function parseDigits(text, pos) {
function parseWithDecimal (line 416) | function parseWithDecimal(text, pos) {
function parseNumber (line 425) | function parseNumber(text, pos) {
function parseNegativeNumber (line 448) | function parseNegativeNumber(text, pos) {
function expect (line 460) | function expect(char, text, pos, message) {
function parseComment (line 468) | function parseComment(text, pos, next) {
function maybeSkipComment (line 480) | function maybeSkipComment(text, pos) {
function skip (line 494) | function skip(text, _pos) {
function parse (line 509) | function parse(text, _pos) {
function parseArrayValue (line 587) | function parseArrayValue(text, pos) {
function parseArray (line 629) | function parseArray(text, pos) {
function parseObjectValue (line 651) | function parseObjectValue(text, pos) {
function parseObject (line 717) | function parseObject(text, pos) {
function parse$1 (line 761) | function parse$1(text) {
function bind (line 771) | function bind(v, fn) {
function get (line 777) | function get(key, t) {
function nth (line 799) | function nth(n, t) {
function string (line 812) | function string(t) {
function number (line 820) | function number(t) {
function array (line 828) | function array(t) {
function obj (line 836) | function obj(t) {
function bool (line 844) | function bool(t) {
function $$null (line 858) | function $$null(t) {
function parsePath (line 864) | function parsePath(_keyList, _t) {
function getPath (line 881) | function getPath(path, t) {
FILE: analysis/examples/example-project/src/Other.res.js
function concat (line 9) | function concat(first, second) {
function show (line 18) | function show(o) {
FILE: analysis/examples/example-project/src/TransformHelpers.res.js
function deserialize_Belt__HashMapInt__t (line 4) | function deserialize_Belt__HashMapInt__t(transformer, t) {
function deserialize_Belt_HashMapInt____t (line 16) | function deserialize_Belt_HashMapInt____t(a, b) {
function deserialize_Belt__HashMap__Int__t (line 28) | function deserialize_Belt__HashMap__Int__t(a, b) {
function serialize_Belt__HashMap__Int__t (line 40) | function serialize_Belt__HashMap__Int__t(a, b) {
function serialize_Belt_HashMapInt____t (line 52) | function serialize_Belt_HashMapInt____t(transformer, t) {
FILE: analysis/examples/example-project/src/ZZ.res.js
function s (line 15) | function s(prim) {
function ZZ$M (line 19) | function ZZ$M(props) {
function ZZ$J (line 31) | function ZZ$J(props) {
function testRecordFields (line 58) | function testRecordFields(gr) {
function uncurried (line 62) | function uncurried(x) {
function functionWithTypeAnnotation (line 70) | function functionWithTypeAnnotation() {
function ZZ$HoverInsideModuleWithComponent (line 74) | function ZZ$HoverInsideModuleWithComponent(props) {
function foo (line 83) | function foo(age, name) {
function next (line 87) | function next(numberOpt, year) {
function customDouble (line 97) | function customDouble(foo) {
function customDouble2 (line 101) | function customDouble2(foo) {
function customDouble$1 (line 110) | function customDouble$1(foo) {
function ZZ$O$Comp (line 116) | function ZZ$O$Comp(props) {
FILE: analysis/examples/example-project/src/syntax/sample-highlighting.rs
function some_function (line 2) | fn some_function(param: usize) -> usize {
type someRecord (line 8) | struct someRecord<typeParameter> {
type someEnum (line 14) | enum someEnum {
function destructuring (line 21) | fn destructuring() -> usize {
FILE: analysis/examples/example-project/src/syntax/sample-highlighting.tsx
type someRecord (line 14) | type someRecord<typeParameter> = {
type someEnum (line 22) | enum someEnum {
type t (line 44) | enum t {
function someDecorator (line 52) | function someDecorator() {
class SomeClass (line 62) | class SomeClass {
method doStuff (line 63) | doStuff() {
type Props (line 72) | interface Props {
function Property (line 92) | function Property() {
FILE: analysis/examples/larger-project/src/BucklescriptAnnotations.js
function bar (line 4) | function bar(x) {
FILE: analysis/examples/larger-project/src/ComponentAsProp.js
function ComponentAsProp (line 6) | function ComponentAsProp(Props) {
FILE: analysis/examples/larger-project/src/CreateErrorHandler1.js
function notification (line 6) | function notification(s) {
FILE: analysis/examples/larger-project/src/CreateErrorHandler2.js
function notification (line 5) | function notification(n) {
FILE: analysis/examples/larger-project/src/Docstrings.js
function signMessage (line 4) | function signMessage(message, key) {
function one (line 8) | function one(a) {
function two (line 12) | function two(a, b) {
function tree (line 16) | function tree(a, b, c) {
function oneU (line 20) | function oneU(a) {
function twoU (line 24) | function twoU(a, b) {
function treeU (line 28) | function treeU(a, b, c) {
function useParam (line 32) | function useParam(param) {
function useParamU (line 36) | function useParamU(param) {
function unnamed1 (line 40) | function unnamed1(param) {
function unnamed1U (line 44) | function unnamed1U(param) {
function unnamed2 (line 48) | function unnamed2(param, param$1) {
function unnamed2U (line 52) | function unnamed2U(param, param$1) {
function grouped (line 56) | function grouped(x, y, a, b, c, z) {
function unitArgWithoutConversion (line 60) | function unitArgWithoutConversion(param) {
function unitArgWithoutConversionU (line 64) | function unitArgWithoutConversionU() {
function unitArgWithConversion (line 68) | function unitArgWithConversion(param) {
function unitArgWithConversionU (line 72) | function unitArgWithConversionU() {
FILE: analysis/examples/larger-project/src/DynamicallyLoadedComponent.js
function DynamicallyLoadedComponent (line 4) | function DynamicallyLoadedComponent(Props) {
FILE: analysis/examples/larger-project/src/EmptyArray.js
function EmptyArray$Z (line 5) | function EmptyArray$Z(Props) {
FILE: analysis/examples/larger-project/src/ErrorHandler.js
function Make (line 5) | function Make($$Error) {
FILE: analysis/examples/larger-project/src/FC.js
function foo (line 4) | function foo(impl) {
FILE: analysis/examples/larger-project/src/FirstClassModules.js
function k3 (line 12) | function k3(x) {
function testConvert (line 45) | function testConvert(m) {
function SomeFunctor (line 49) | function SomeFunctor(X) {
function someFunctorAsFunction (line 55) | function someFunctorAsFunction(x) {
FILE: analysis/examples/larger-project/src/Hooks.js
function Hooks (line 8) | function Hooks(Props) {
function Hooks$anotherComponent (line 42) | function Hooks$anotherComponent(Props) {
function Hooks$Inner (line 49) | function Hooks$Inner(Props) {
function Hooks$Inner$anotherComponent (line 54) | function Hooks$Inner$anotherComponent(Props) {
function Hooks$Inner$Inner2 (line 59) | function Hooks$Inner$Inner2(Props) {
function Hooks$Inner$Inner2$anotherComponent (line 64) | function Hooks$Inner$Inner2$anotherComponent(Props) {
function Hooks$NoProps (line 80) | function Hooks$NoProps(Props) {
function functionWithRenamedArgs (line 88) | function functionWithRenamedArgs(_to, _Type, cb) {
function Hooks$componentWithRenamedArgs (line 93) | function Hooks$componentWithRenamedArgs(Props) {
function Hooks$makeWithRef (line 101) | function Hooks$makeWithRef(Props) {
function Hooks$polymorphicComponent (line 125) | function Hooks$polymorphicComponent(Props) {
function Hooks$functionReturningReactElement (line 130) | function Hooks$functionReturningReactElement(Props) {
function Hooks$RenderPropRequiresConversion (line 134) | function Hooks$RenderPropRequiresConversion(Props) {
function Hooks$aComponentWithChildren (line 148) | function Hooks$aComponentWithChildren(Props) {
FILE: analysis/examples/larger-project/src/ImportHooks.js
function foo (line 7) | function foo(prim) {
FILE: analysis/examples/larger-project/src/ImportJsValue.js
function round (line 6) | function round(prim) {
function area (line 10) | function area(prim) {
function returnMixedArray (line 14) | function returnMixedArray(prim) {
function getAbs (line 25) | function getAbs(x) {
function useGetProp (line 33) | function useGetProp(x) {
function useGetAbs (line 37) | function useGetAbs(x) {
function useColor (line 41) | function useColor(prim) {
function higherOrder (line 45) | function higherOrder(prim) {
function convertVariant (line 53) | function convertVariant(prim) {
function polymorphic (line 57) | function polymorphic(prim) {
FILE: analysis/examples/larger-project/src/ImportMyBanner.js
function make (line 6) | function make(prim0, prim1, prim2) {
FILE: analysis/examples/larger-project/src/ModuleAliases.js
function testNested (line 22) | function testNested(x) {
function testInner (line 26) | function testInner(x) {
function testInner2 (line 30) | function testInner2(x) {
FILE: analysis/examples/larger-project/src/ModuleExceptionBug.js
function customDouble (line 5) | function customDouble(foo) {
FILE: analysis/examples/larger-project/src/NestedModules.js
function nested3Function (line 4) | function nested3Function(x) {
function nested2Function (line 17) | function nested2Function(x) {
FILE: analysis/examples/larger-project/src/Newton.js
function $neg (line 5) | function $neg(prim0, prim1) {
function $plus (line 9) | function $plus(prim0, prim1) {
function $star (line 13) | function $star(prim0, prim1) {
function $slash (line 17) | function $slash(prim0, prim1) {
function newton (line 21) | function newton(f, fPrimed, initial, threshold) {
function f (line 42) | function f(x) {
function fPrimed (line 46) | function fPrimed(x) {
FILE: analysis/examples/larger-project/src/Opaque.js
function noConversion (line 4) | function noConversion(x) {
function testConvertNestedRecordFromOtherFile (line 8) | function testConvertNestedRecordFromOtherFile(x) {
FILE: analysis/examples/larger-project/src/OptArg.js
function foo (line 4) | function foo(xOpt, yOpt, zOpt, w) {
function bar (line 11) | function bar(x, y, z, w) {
function threeArgs (line 19) | function threeArgs(aOpt, bOpt, cOpt, d) {
function twoArgs (line 30) | function twoArgs(aOpt, bOpt, c) {
function wrapfourArgs (line 42) | function wrapfourArgs(a, b, c, n) {
FILE: analysis/examples/larger-project/src/P.js
function input (line 7) | function input(param) {
function output (line 19) | function output(param) {
function open_temp_file (line 31) | function open_temp_file(param) {
function close_out (line 43) | function close_out(param) {
function output_char (line 55) | function output_char(param) {
function really_input (line 67) | function really_input(param) {
function pp_get_formatter_tag_functions (line 79) | function pp_get_formatter_tag_functions(param) {
FILE: analysis/examples/larger-project/src/Records.js
function computeArea (line 9) | function computeArea(param) {
function coord2d (line 15) | function coord2d(x, y) {
function findAddress (line 25) | function findAddress(business) {
function findAllAddresses (line 34) | function findAllAddresses(businesses) {
function getPayload (line 52) | function getPayload(param) {
function getPayloadRecord (line 56) | function getPayloadRecord(param) {
function getPayloadRecordPlusOne (line 70) | function getPayloadRecordPlusOne(param) {
function findAddress2 (line 78) | function findAddress2(business) {
function computeArea3 (line 97) | function computeArea3(o) {
function computeArea4 (line 103) | function computeArea4(o) {
function testMyRec (line 109) | function testMyRec(x) {
function testMyRec2 (line 113) | function testMyRec2(x) {
function testMyObj (line 117) | function testMyObj(x) {
function testMyObj2 (line 121) | function testMyObj2(x) {
function testMyRecBsAs (line 125) | function testMyRecBsAs(x) {
function testMyRecBsAs2 (line 129) | function testMyRecBsAs2(x) {
FILE: analysis/examples/larger-project/src/References.js
function create (line 4) | function create(x) {
function access (line 10) | function access(r) {
function update (line 14) | function update(r) {
function get (line 19) | function get(r) {
function make (line 23) | function make(prim) {
function set (line 29) | function set(r, v) {
function destroysRefIdentity (line 40) | function destroysRefIdentity(x) {
function preserveRefIdentity (line 44) | function preserveRefIdentity(x) {
FILE: analysis/examples/larger-project/src/RepeatedLabel.js
function userData (line 4) | function userData(param) {
FILE: analysis/examples/larger-project/src/Shadow.js
function test (line 4) | function test(param) {
function test$1 (line 8) | function test$1(param) {
FILE: analysis/examples/larger-project/src/TestFirstClassModules.js
function convert (line 4) | function convert(x) {
function convertInterface (line 8) | function convertInterface(x) {
function convertRecord (line 12) | function convertRecord(x) {
function convertFirstClassModuleWithTypeEquations (line 16) | function convertFirstClassModuleWithTypeEquations(x) {
FILE: analysis/examples/larger-project/src/TestImmutableArray.js
function testImmutableArrayGet (line 6) | function testImmutableArrayGet(arr) {
function testBeltArrayGet (line 10) | function testBeltArrayGet(arr) {
function testBeltArraySet (line 14) | function testBeltArraySet(arr) {
FILE: analysis/examples/larger-project/src/TestImport.js
function make (line 14) | function make(prim0, prim1, prim2) {
FILE: analysis/examples/larger-project/src/TestModuleAliases.js
function testInner1 (line 4) | function testInner1(x) {
function testInner1Expanded (line 8) | function testInner1Expanded(x) {
function testInner2 (line 12) | function testInner2(x) {
function testInner2Expanded (line 16) | function testInner2Expanded(x) {
FILE: analysis/examples/larger-project/src/TestOptArg.js
function foo (line 7) | function foo(xOpt, y) {
function bar (line 12) | function bar(param) {
function notSuppressesOptArgs (line 19) | function notSuppressesOptArgs(xOpt, yOpt, zOpt, w) {
function liveSuppressesOptArgs (line 28) | function liveSuppressesOptArgs(xOpt, yOpt, zOpt, w) {
FILE: analysis/examples/larger-project/src/TestPromise.js
function convert (line 4) | function convert(param) {
FILE: analysis/examples/larger-project/src/TransitiveType1.js
function convert (line 4) | function convert(x) {
function convertAlias (line 8) | function convertAlias(x) {
FILE: analysis/examples/larger-project/src/TransitiveType2.js
function convertT2 (line 4) | function convertT2(x) {
FILE: analysis/examples/larger-project/src/TransitiveType3.js
function convertT3 (line 4) | function convertT3(x) {
FILE: analysis/examples/larger-project/src/Tuples.js
function testTuple (line 5) | function testTuple(param) {
function computeArea (line 9) | function computeArea(param) {
function computeAreaWithIdent (line 15) | function computeAreaWithIdent(param) {
function computeAreaNoConverters (line 21) | function computeAreaNoConverters(param) {
function coord2d (line 25) | function coord2d(x, y) {
function getFirstName (line 33) | function getFirstName(param) {
function marry (line 37) | function marry(first, second) {
function changeSecondAge (line 44) | function changeSecondAge(param) {
FILE: analysis/examples/larger-project/src/TypeParams3.js
function test (line 4) | function test(x) {
function test2 (line 8) | function test2(x) {
FILE: analysis/examples/larger-project/src/Types.js
function swap (line 7) | function swap(tree) {
function selfRecursiveConverter (line 15) | function selfRecursiveConverter(param) {
function mutuallyRecursiveConverter (line 19) | function mutuallyRecursiveConverter(param) {
function testFunctionOnOptionsAsArgument (line 23) | function testFunctionOnOptionsAsArgument(a, foo) {
function jsonStringify (line 27) | function jsonStringify(prim) {
function testConvertNull (line 31) | function testConvertNull(x) {
function setMatch (line 47) | function setMatch(x) {
function testInstantiateTypeParameter (line 52) | function testInstantiateTypeParameter(x) {
FILE: analysis/examples/larger-project/src/Unboxed.js
function testV1 (line 4) | function testV1(x) {
function r2Test (line 8) | function r2Test(x) {
FILE: analysis/examples/larger-project/src/Uncurried.js
function uncurried0 (line 5) | function uncurried0() {
function uncurried1 (line 9) | function uncurried1(x) {
function uncurried2 (line 13) | function uncurried2(x, y) {
function uncurried3 (line 17) | function uncurried3(x, y, z) {
function curried3 (line 21) | function curried3(x, y, z) {
function callback (line 25) | function callback(cb) {
function callback2 (line 29) | function callback2(auth) {
function callback2U (line 33) | function callback2U(auth) {
function sumU (line 37) | function sumU(n, m) {
function sumU2 (line 42) | function sumU2(n) {
function sumCurried (line 49) | function sumCurried(n) {
function sumLblCurried (line 57) | function sumLblCurried(s, n) {
FILE: analysis/examples/larger-project/src/Unison.js
function group (line 4) | function group(breakOpt, doc) {
function fits (line 12) | function fits(_w, _stack) {
function toString (line 28) | function toString(width, stack) {
FILE: analysis/examples/larger-project/src/UseImportJsValue.js
function useGetProp (line 4) | function useGetProp(x) {
function useTypeImportedInOtherModule (line 8) | function useTypeImportedInOtherModule(x) {
FILE: analysis/examples/larger-project/src/Variants.js
function isWeekend (line 4) | function isWeekend(x) {
function onlySunday (line 12) | function onlySunday(param) {
function swap (line 16) | function swap(x) {
function testConvert (line 24) | function testConvert(x) {
function testConvert2 (line 28) | function testConvert2(x) {
function testConvert3 (line 32) | function testConvert3(x) {
function testConvert2to3 (line 36) | function testConvert2to3(x) {
function id1 (line 40) | function id1(x) {
function id2 (line 44) | function id2(x) {
function polyWithOpt (line 48) | function polyWithOpt(foo) {
function restResult1 (line 64) | function restResult1(x) {
function restResult2 (line 68) | function restResult2(x) {
function restResult3 (line 72) | function restResult3(x) {
FILE: analysis/examples/larger-project/src/VariantsWithPayload.js
function testWithPayload (line 4) | function testWithPayload(x) {
function printVariantWithPayload (line 8) | function printVariantWithPayload(x) {
function testManyPayloads (line 28) | function testManyPayloads(x) {
function printManyPayloads (line 32) | function printManyPayloads(x) {
function testSimpleVariant (line 48) | function testSimpleVariant(x) {
function testVariantWithPayloads (line 52) | function testVariantWithPayloads(x) {
function printVariantWithPayloads (line 56) | function printVariantWithPayloads(x) {
function testVariant1Int (line 79) | function testVariant1Int(x) {
function testVariant1Object (line 83) | function testVariant1Object(x) {
FILE: analysis/examples/larger-project/src/arg_helper.js
function fatal (line 13) | function fatal(err) {
function Make (line 18) | function Make(S) {
FILE: analysis/examples/larger-project/src/clflags.js
function std_include_flag (line 378) | function std_include_flag(prefix) {
function std_include_dir (line 386) | function std_include_dir(param) {
function rounds (line 451) | function rounds(param) {
function dumped_pass (line 574) | function dumped_pass(s) {
function set_dumped_pass (line 589) | function set_dumped_pass(s, enabled) {
function parse_color_setting (line 604) | function parse_color_setting(x) {
function reset_arguments (line 633) | function reset_arguments(param) {
function add_arguments (line 639) | function add_arguments(loc, args) {
function print_arguments (line 663) | function print_arguments(usage) {
function parse_arguments (line 667) | function parse_arguments(f, msg) {
FILE: analysis/examples/larger-project/src/config.js
function print_config (line 169) | function print_config(oc) {
FILE: analysis/examples/larger-project/src/exception/Arr.js
function ff (line 5) | function ff(a) {
FILE: analysis/examples/larger-project/src/exception/ExnB.js
function foo (line 4) | function foo(param) {
FILE: analysis/examples/larger-project/src/exception/ExportWithRename.js
function ExportWithRename (line 4) | function ExportWithRename(Props) {
FILE: analysis/examples/larger-project/src/exception/TestInnerModules.js
function testM1 (line 8) | function testM1(x) {
function testM2 (line 12) | function testM2(x) {
FILE: analysis/examples/larger-project/src/exception/TestYojson.js
function foo (line 8) | function foo(x) {
function bar (line 12) | function bar(str, json) {
function toString (line 31) | function toString(x) {
function toInt (line 35) | function toInt(x) {
FILE: analysis/examples/larger-project/src/exception/Yojson.js
function from_string (line 7) | function from_string(param) {
function member (line 17) | function member(_s, j) {
function to_int (line 26) | function to_int(param) {
function to_string (line 30) | function to_string(param) {
FILE: analysis/examples/larger-project/src/identifiable.js
function Pair (line 14) | function Pair(A, B) {
function Make_map (line 51) | function Make_map(T) {
function Make_set (line 253) | function Make_set(T) {
function Make_tbl (line 339) | function Make_tbl(T) {
function Make (line 642) | function Make(T) {
FILE: analysis/examples/larger-project/src/location.js
function in_file (line 21) | function in_file(name) {
function curr (line 37) | function curr(lexbuf) {
function init (line 45) | function init(lexbuf, fname) {
function symbol_rloc (line 55) | function symbol_rloc(param) {
function symbol_gloc (line 63) | function symbol_gloc(param) {
function rhs_loc (line 71) | function rhs_loc(n) {
function set_input_name (line 87) | function set_input_name(name) {
function absolute_path (line 99) | function absolute_path(s) {
function show_filename (line 123) | function show_filename(file) {
function print_filename (line 132) | function print_filename(ppf, file) {
function reset (line 136) | function reset(param) {
function get_pos_info (line 141) | function get_pos_info(pos) {
function print_compact (line 151) | function print_compact(ppf, loc) {
function echo_eof (line 162) | function echo_eof(param) {
function mkloc (line 168) | function mkloc(txt, loc) {
function mknoloc (line 175) | function mknoloc(txt) {
function pp_ksprintf (line 182) | function pp_ksprintf(before, k, fmt) {
function print_phanton_error_prefix (line 195) | function print_phanton_error_prefix(ppf) {
function errorf (line 199) | function errorf(locOpt, subOpt, if_highlightOpt, fmt) {
function error (line 213) | function error(locOpt, subOpt, if_highlightOpt, msg) {
function register_error_of_exn (line 229) | function register_error_of_exn(f) {
function error_of_exn$1 (line 237) | function error_of_exn$1(exn) {
function error_of_printer (line 259) | function error_of_printer(loc, print, x) {
function error_of_printer_file (line 263) | function error_of_printer_file(print, x) {
function raise_errorf (line 292) | function raise_errorf(locOpt, subOpt, if_highlightOpt) {
FILE: analysis/examples/larger-project/src/longident.js
function flat (line 8) | function flat(_accu, _x) {
function flatten (line 32) | function flatten(lid) {
function last (line 36) | function last(x) {
function split_at_dots (line 48) | function split_at_dots(s, pos) {
function unflatten (line 68) | function unflatten(l) {
function parse (line 84) | function parse(s) {
FILE: analysis/examples/larger-project/src/misc.js
function fatal_error (line 33) | function fatal_error(msg) {
function fatal_errorf (line 42) | function fatal_errorf(fmt) {
function try_finally (line 46) | function try_finally(work, cleanup) {
function set_refs (line 59) | function set_refs(l) {
function protect_refs (line 66) | function protect_refs(refs, f) {
function map_end (line 87) | function map_end(f, l1, l2) {
function map_left_right (line 98) | function map_left_right(f, x) {
function for_all2 (line 109) | function for_all2(pred, _l1, _l2) {
function replicate_list (line 132) | function replicate_list(elem, n) {
function list_remove (line 143) | function list_remove(x, y) {
function split_last (line 155) | function split_last(x) {
function compare (line 185) | function compare(cmp, _l1, _l2) {
function equal (line 209) | function equal(eq, _l1, _l2) {
function filter_map (line 232) | function filter_map(f, l) {
function map2_prefix (line 256) | function map2_prefix(f, l1, l2) {
function some_if_all_elements_are_some (line 288) | function some_if_all_elements_are_some(l) {
function split_at (line 310) | function split_at(n, l) {
function equal$1 (line 350) | function equal$1(eq, o1, o2) {
function iter (line 362) | function iter(f, x) {
function map (line 369) | function map(f, x) {
function fold (line 376) | function fold(f, a, b) {
function value_default (line 384) | function value_default(f, $$default, a) {
function exists2 (line 400) | function exists2(p, a1, a2) {
function find_in_path (line 429) | function find_in_path(path, name) {
function find_in_path_rel (line 457) | function find_in_path_rel(path, name) {
function find_in_path_uncap (line 491) | function find_in_path_uncap(path, name) {
function remove_file (line 516) | function remove_file(filename) {
function expand_directory (line 533) | function expand_directory(alt, s) {
function create_hashtable (line 541) | function create_hashtable(size, init) {
function copy_file (line 549) | function copy_file(ic, oc) {
function copy_file_chunk (line 563) | function copy_file_chunk(ic, oc, len) {
function string_of_file (line 584) | function string_of_file(ic) {
function output_to_file_via_temporary (line 599) | function output_to_file_via_temporary(modeOpt, filename, fn) {
function log2 (line 627) | function log2(n) {
function align (line 635) | function align(n, a) {
function no_overflow_add (line 643) | function no_overflow_add(a, b) {
function no_overflow_sub (line 647) | function no_overflow_sub(a, b) {
function no_overflow_mul (line 651) | function no_overflow_mul(a, b) {
function no_overflow_lsl (line 659) | function no_overflow_lsl(a, k) {
function cvt_int_aux (line 667) | function cvt_int_aux(str, neg, of_string) {
function $$int (line 675) | function $$int(s) {
function int32 (line 681) | function int32(s) {
function int64 (line 687) | function int64(s) {
function nativeint (line 691) | function nativeint(s) {
function chop_extensions (line 705) | function chop_extensions(file) {
function search_substring (line 726) | function search_substring(pat, str, start) {
function replace_substring (line 751) | function replace_substring(before, after, str) {
function rev_split_words (line 783) | function rev_split_words(s) {
function get_ref (line 834) | function get_ref(r) {
function fst3 (line 840) | function fst3(param) {
function snd3 (line 844) | function snd3(param) {
function thd3 (line 848) | function thd3(param) {
function fst4 (line 852) | function fst4(param) {
function snd4 (line 856) | function snd4(param) {
function thd4 (line 860) | function thd4(param) {
function for4 (line 864) | function for4(param) {
function create (line 868) | function create(str_size) {
function length (line 878) | function length(tbl) {
function get (line 883) | function get(tbl, ind) {
function set (line 887) | function set(tbl, ind, c) {
function blit (line 891) | function blit(src, srcoff, dst, dstoff, len) {
function output (line 898) | function output(oc, tbl, pos, len) {
function unsafe_blit_to_bytes (line 905) | function unsafe_blit_to_bytes(src, srcoff, dst, dstoff, len) {
function input_bytes (line 912) | function input_bytes(ic, len) {
function edit_distance (line 931) | function edit_distance(a, b, cutoff) {
function spellcheck (line 962) | function spellcheck(env, name) {
function did_you_mean (line 1000) | function did_you_mean(ppf, get_choices) {
function cut_at (line 1011) | function cut_at(s, c) {
function ansi_of_color (line 1031) | function ansi_of_color(x) {
function code_of_style (line 1053) | function code_of_style(x) {
function ansi_of_style_l (line 1067) | function ansi_of_style_l(l) {
function get_styles (line 1105) | function get_styles(param) {
function set_styles (line 1109) | function set_styles(s) {
function style_of_tag (line 1114) | function style_of_tag(s) {
function mark_open_tag (line 1134) | function mark_open_tag(or_else, s) {
function mark_close_tag (line 1152) | function mark_close_tag(or_else, s) {
function set_color_tag_handling (line 1173) | function set_color_tag_handling(ppf) {
function should_enable_color (line 1185) | function should_enable_color(param) {
function setup (line 1222) | function setup(o) {
function normalise_eol (line 1266) | function normalise_eol(s) {
function delete_eol_spaces (line 1277) | function delete_eol_spaces(src) {
function raise_direct_hook_exn (line 1333) | function raise_direct_hook_exn(e) {
function fold_hooks (line 1341) | function fold_hooks(list, hook_info, ast) {
function MakeHooks (line 1362) | function MakeHooks(M) {
FILE: analysis/examples/larger-project/src/nativeint.js
function to_string (line 8) | function to_string(n) {
function of_string_opt (line 12) | function of_string_opt(s) {
FILE: analysis/examples/larger-project/src/numbers.js
function of_int_exn (line 10) | function of_int_exn(i) {
function to_int (line 14) | function to_int(i) {
function of_int_exn$1 (line 25) | function of_int_exn$1(i) {
function to_int$1 (line 35) | function to_int$1(t) {
FILE: analysis/examples/larger-project/src/printf.js
function printf (line 4) | function printf(param) {
function fprintf (line 16) | function fprintf(param) {
function sprintf (line 28) | function sprintf(param) {
function eprintf (line 40) | function eprintf(param) {
FILE: analysis/examples/larger-project/src/res_comment.js
function styleToString (line 8) | function styleToString(s) {
function loc (line 16) | function loc(t) {
function txt (line 20) | function txt(t) {
function prevTokEndPos (line 24) | function prevTokEndPos(t) {
function setPrevTokEndPos (line 28) | function setPrevTokEndPos(t, pos) {
function isSingleLineComment (line 33) | function isSingleLineComment(t) {
function toString (line 42) | function toString(t) {
function makeSingleLineComment (line 46) | function makeSingleLineComment(loc, txt) {
function makeMultiLineComment (line 55) | function makeMultiLineComment(loc, txt) {
function fromOcamlComment (line 64) | function fromOcamlComment(loc, txt, prevTokEndPos) {
function trimSpaces (line 73) | function trimSpaces(s) {
FILE: analysis/examples/larger-project/src/res_comments_table.js
function make (line 13) | function make(param) {
function copy (line 21) | function copy(tbl) {
function log (line 31) | function log(t) {
function attach (line 173) | function attach(tbl, loc, comments) {
function partitionByLoc (line 180) | function partitionByLoc(comments, loc) {
function partitionLeadingTrailing (line 240) | function partitionLeadingTrailing(comments, loc) {
function partitionByOnSameLine (line 283) | function partitionByOnSameLine(loc, comments) {
function partitionAdjacentTrailing (line 326) | function partitionAdjacentTrailing(loc1, comments) {
function collectListPatterns (line 359) | function collectListPatterns(_acc, _pattern) {
function collectListExprs (line 453) | function collectListExprs(_acc, _expr) {
function arrowType (line 540) | function arrowType(ct) {
function modExprApply (line 627) | function modExprApply(modExpr) {
function modExprFunctor (line 649) | function modExprFunctor(modExpr) {
function functorType (line 679) | function functorType(modtype) {
function funExpr (line 709) | function funExpr(expr) {
function isBlockExpr (line 850) | function isBlockExpr(expr) {
function isIfThenElseExpr (line 877) | function isIfThenElseExpr(expr) {
function walkStructure (line 886) | function walkStructure(s, t, comments) {
function walkStructureItem (line 898) | function walkStructureItem(si, t, comments) {
function walkValueDescription (line 939) | function walkValueDescription(vd, t, comments) {
function walkTypeExtension (line 950) | function walkTypeExtension(te, t, comments) {
function walkIncludeDeclaration (line 965) | function walkIncludeDeclaration(inclDecl, t, comments) {
function walkModuleTypeDeclaration (line 972) | function walkModuleTypeDeclaration(mtd, t, comments) {
function walkModuleBinding (line 988) | function walkModuleBinding(mb, t, comments) {
function walkSignature (line 1012) | function walkSignature(signature, t, comments) {
function walkSignatureItem (line 1024) | function walkSignatureItem(si, t, comments) {
function walkIncludeDescription (line 1061) | function walkIncludeDescription(id, t, comments) {
function walkModuleDeclaration (line 1068) | function walkModuleDeclaration(md, t, comments) {
function walkList (line 1079) | function walkList(_prevLoc, getLoc, walkNode, _l, t, _comments) {
function visitListButContinueWithRemainingComments (line 1120) | function visitListButContinueWithRemainingComments(_prevLoc, newlineDeli...
function walkValueBindings (line 1162) | function walkValueBindings(vbs, t, comments) {
function walkOpenDescription (line 1168) | function walkOpenDescription(openDescription, t, comments) {
function walkTypeDeclarations (line 1175) | function walkTypeDeclarations(typeDeclarations, t, comments) {
function walkTypeParam (line 1181) | function walkTypeParam(param, t, comments) {
function walkTypeDeclaration (line 1185) | function walkTypeDeclaration(td, t, comments) {
function walkLabelDeclarations (line 1222) | function walkLabelDeclarations(lds, t, comments) {
function walkLabelDeclaration (line 1228) | function walkLabelDeclaration(ld, t, comments) {
function walkConstructorDeclarations (line 1239) | function walkConstructorDeclarations(cds, t, comments) {
function walkConstructorDeclaration (line 1245) | function walkConstructorDeclaration(cd, t, comments) {
function walkConstructorArguments (line 1266) | function walkConstructorArguments(args, t, comments) {
function walkValueBinding (line 1276) | function walkValueBinding(vb, t, comments) {
function walkExpr (line 1396) | function walkExpr(_expr, t, _comments) {
function walkExprPararameter (line 2334) | function walkExprPararameter(param, t, comments) {
function walkExprArgument (line 2356) | function walkExprArgument(param, t, comments) {
function walkCase (line 2380) | function walkCase($$case, t, comments) {
function walkExprRecordRow (line 2429) | function walkExprRecordRow(param, t, comments) {
function walkExtConstr (line 2442) | function walkExtConstr(extConstr, t, comments) {
function walkExtensionConstructorKind (line 2450) | function walkExtensionConstructorKind(kind, t, comments) {
function walkModExpr (line 2468) | function walkModExpr(modExpr, t, comments) {
function walkModExprParameter (line 2560) | function walkModExprParameter(parameter, t, comments) {
function walkModType (line 2577) | function walkModType(modType, t, comments) {
function walkModTypeParameter (line 2635) | function walkModTypeParameter(param, t, comments) {
function walkPattern (line 2652) | function walkPattern(_pat, t, comments) {
function walkPatternRecordRow (line 2797) | function walkPatternRecordRow(row, t, comments) {
function walkTypExpr (line 2826) | function walkTypExpr(typ, t, comments) {
function walkTypObjectFields (line 2886) | function walkTypObjectFields(fields, t, comments) {
function walkTypObjectField (line 2900) | function walkTypObjectField(field, t, comments) {
function walkTypeParameters (line 2916) | function walkTypeParameters(typeParameters, t, comments) {
function walkTypeParameter (line 2936) | function walkTypeParameter(param, t, comments) {
function walkPackageType (line 2944) | function walkPackageType(packageType, t, comments) {
function walkPackageConstraints (line 2953) | function walkPackageConstraints(packageConstraints, t, comments) {
function walkPackageConstraint (line 2964) | function walkPackageConstraint(packageConstraint, t, comments) {
function walkExtension (line 2977) | function walkExtension(extension, t, comments) {
function walkAttribute (line 2986) | function walkAttribute(param, t, comments) {
function walkPayload (line 2995) | function walkPayload(payload, t, comments) {
FILE: analysis/examples/larger-project/src/res_core.js
function mkLoc (line 25) | function mkLoc(startLoc, endLoc) {
function defaultExpr (line 33) | function defaultExpr(param) {
function defaultType (line 47) | function defaultType(param) {
function defaultPattern (line 58) | function defaultPattern(param) {
function defaultModuleExpr (line 69) | function defaultModuleExpr(param) {
function defaultModuleType (line 73) | function defaultModuleType(param) {
function recoverEqualGreater (line 87) | function recoverEqualGreater(p) {
function shouldAbortListParse (line 96) | function shouldAbortListParse(p) {
function experimentalIfLet (line 136) | function experimentalIfLet(expr) {
function attributeWithoutNode (line 172) | function attributeWithoutNode(attr) {
function typeDeclarationNameLongident (line 177) | function typeDeclarationNameLongident(longident) {
function missingTildeLabeledParameter (line 183) | function missingTildeLabeledParameter(name) {
function objectQuotedFieldName (line 195) | function objectQuotedFieldName(name) {
function polyVarIntWithSuffix (line 203) | function polyVarIntWithSuffix(number) {
function makeBracesAttr (line 297) | function makeBracesAttr(loc) {
function getClosingToken (line 319) | function getClosingToken(x) {
function goToClosing (line 356) | function goToClosing(closingToken, state) {
function isEs6ArrowExpression (line 440) | function isEs6ArrowExpression(inTernary, p) {
function isEs6ArrowFunctor (line 546) | function isEs6ArrowFunctor(p) {
function isEs6ArrowType (line 589) | function isEs6ArrowType(p) {
function buildLongident (line 619) | function buildLongident(words) {
function makeInfixOperator (line 644) | function makeInfixOperator(p, token, startPos, endPos) {
function negateString (line 670) | function negateString(s) {
function makeUnaryExpr (line 678) | function makeUnaryExpr(startPos, tokenEnd, token, operand) {
function makeListExpression (line 785) | function makeListExpression(loc, seq, extOpt) {
function makeListPattern (line 833) | function makeListPattern(loc, seq, ext_opt) {
function lidentOfPath (line 887) | function lidentOfPath(longident) {
function makeNewtypes (line 896) | function makeNewtypes(attrs, loc, newtypes, exp) {
function wrapTypeAnnotation (line 911) | function wrapTypeAnnotation(loc, newtypes, core_type, body) {
function processUnderscoreApplication (line 920) | function processUnderscoreApplication(args) {
function hexValue (line 985) | function hexValue(ch) {
function removeModuleNameFromPunnedFieldValue (line 1005) | function removeModuleNameFromPunnedFieldValue(exp) {
function parseStringLiteral (line 1030) | function parseStringLiteral(s) {
function parseLident (line 1328) | function parseLident(p) {
function parseIdent (line 1385) | function parseIdent(msg, startPos, p) {
function parseHashIdent (line 1442) | function parseHashIdent(startPos, p) {
function parseValuePath (line 1480) | function parseValuePath(p) {
function parseValuePathAfterDot (line 1568) | function parseValuePathAfterDot(p) {
function parseValuePathTail (line 1591) | function parseValuePathTail(p, startPos, ident) {
function parseModuleLongIdentTail (line 1635) | function parseModuleLongIdentTail(lowercase, p, startPos, ident) {
function parseModuleLongIdent (line 1695) | function parseModuleLongIdent(lowercase, p) {
function parseIdentPath (line 1749) | function parseIdentPath(p) {
function verifyJsxOpeningClosingName (line 1812) | function verifyJsxOpeningClosingName(p, nameExpr) {
function string_of_pexp_ident (line 1873) | function string_of_pexp_ident(nameExpr) {
function parseOpenDescription (line 1884) | function parseOpenDescription(attrs, p) {
function parseTemplateStringLiteral (line 1900) | function parseTemplateStringLiteral(s) {
function parseConstant (line 1955) | function parseConstant(p) {
function parseTemplateConstant (line 2040) | function parseTemplateConstant(prefix, p) {
function parseCommaDelimitedRegion (line 2075) | function parseCommaDelimitedRegion(p, grammar, closing, f) {
function parseCommaDelimitedReversedList (line 2131) | function parseCommaDelimitedReversedList(p, grammar, closing, f) {
function parseDelimitedRegion (line 2187) | function parseDelimitedRegion(p, grammar, closing, f) {
function parseRegion (line 2213) | function parseRegion(p, grammar, f) {
function parsePattern (line 2239) | function parsePattern(aliasOpt, or_Opt, p) {
function parseAttribute (line 2506) | function parseAttribute(p) {
function parseModuleType (line 2521) | function parseModuleType(es6ArrowOpt, with_Opt, p) {
function parseModuleBindings (line 2568) | function parseModuleBindings(attrs, startPos, p) {
function parseModuleBinding (line 2593) | function parseModuleBinding(attrs, startPos, p) {
function parseConstrainedPattern (line 2624) | function parseConstrainedPattern(p) {
function parseLidentList (line 2642) | function parseLidentList(p) {
function parseTypExpr (line 2669) | function parseTypExpr(attrs, es6ArrowOpt, aliasOpt, p) {
function parseConstrainedOrCoercedExpr (line 2688) | function parseConstrainedOrCoercedExpr(p) {
function parseNonSpreadPattern (line 2719) | function parseNonSpreadPattern(msg, p) {
function parseTypeAlias (line 2746) | function parseTypeAlias(p, typ) {
function parseFieldDeclarationRegion (line 2761) | function parseFieldDeclarationRegion(p) {
function parseFieldDeclaration (line 2791) | function parseFieldDeclaration(p) {
function parseArrowTypeRest (line 2814) | function parseArrowTypeRest(es6Arrow, startPos, typ, p) {
function parseStringFieldDeclaration (line 2839) | function parseStringFieldDeclaration(p) {
function parseTagSpec (line 2897) | function parseTagSpec(p) {
function parseTagSpecFulls (line 2910) | function parseTagSpecFulls(p) {
function parseTagSpecFull (line 2929) | function parseTagSpecFull(p) {
function parseTagSpecFirst (line 2942) | function parseTagSpecFirst(p) {
function parseTagSpecs (line 2987) | function parseTagSpecs(p) {
function parseTagNames (line 3000) | function parseTagNames(p) {
function parseRecordRow (line 3009) | function parseRecordRow(p) {
function parsePolyTypeExpr (line 3046) | function parsePolyTypeExpr(p) {
function overParseConstrainedOrCoercedOrArrowExpression (line 3108) | function overParseConstrainedOrCoercedOrArrowExpression(p, expr) {
function parseExpr (line 3200) | function parseExpr(contextOpt, p) {
function parsePayload (line 3207) | function parsePayload(p) {
function parseAttributeId (line 3273) | function parseAttributeId(startPos, p) {
function parseConstrDeclArgs (line 3329) | function parseConstrDeclArgs(p) {
function parsePackageConstraint (line 3572) | function parsePackageConstraint(p) {
function parseConstrDef (line 3588) | function parseConstrDef(parseAttrs, p) {
function parseTypeVarList (line 3686) | function parseTypeVarList(p) {
function parseModuleExpr (line 3705) | function parseModuleExpr(p) {
function parseTypeConstructorDeclaration (line 3721) | function parseTypeConstructorDeclaration(startPos, p) {
function parseConstrainedPatternRegion (line 3748) | function parseConstrainedPatternRegion(p) {
function parseExprBlock (line 3756) | function parseExprBlock(first, p) {
function parsePatternRegion (line 3780) | function parsePatternRegion(p) {
function parseSpreadExprRegion (line 3798) | function parseSpreadExprRegion(p) {
function parsePackageType (line 3818) | function parsePackageType(startPos, attrs, p) {
function parseConstrainedModExpr (line 3841) | function parseConstrainedModExpr(p) {
function parsePolymorphicVariantTypeArgs (line 3859) | function parsePolymorphicVariantTypeArgs(p) {
function parsePolymorphicVariantTypeSpecHash (line 3895) | function parsePolymorphicVariantTypeSpecHash(attrs, full, p) {
function parseTypExprRegion (line 3947) | function parseTypExprRegion(p) {
function parseModuleBindingBody (line 3954) | function parseModuleBindingBody(p) {
function parsePrimaryExpr (line 3970) | function parsePrimaryExpr(operand, noCallOpt, p) {
function parseExceptionDef (line 4053) | function parseExceptionDef(attrs, p) {
function parseNewlineOrSemicolonExprBlock (line 4066) | function parseNewlineOrSemicolonExprBlock(p) {
function parseLetBindings (line 4077) | function parseLetBindings(attrs, p) {
function parseTernaryExpr (line 4137) | function parseTernaryExpr(leftOperand, p) {
function parseFirstClassModuleExpr (line 4163) | function parseFirstClassModuleExpr(startPos, p) {
function parseBinaryExpr (line 4198) | function parseBinaryExpr(contextOpt, a, p, prec) {
function parseOperandExpr (line 4261) | function parseOperandExpr(context, p) {
function parseStandaloneAttribute (line 4340) | function parseStandaloneAttribute(p) {
function parseJsExport (line 4351) | function parseJsExport(attrs, p) {
function parseModuleOrModuleTypeImplOrPackExpr (line 4386) | function parseModuleOrModuleTypeImplOrPackExpr(attrs, p) {
function parseExternalDef (line 4407) | function parseExternalDef(attrs, startPos, p) {
function parseNewlineOrSemicolonStructure (line 4444) | function parseNewlineOrSemicolonStructure(p) {
function parseTypeDefinitionOrExtension (line 4455) | function parseTypeDefinitionOrExtension(attrs, p) {
function parseExtension (line 4504) | function parseExtension(moduleLanguageOpt, p) {
function parseIncludeStatement (line 4520) | function parseIncludeStatement(attrs, p) {
function parseJsImport (line 4533) | function parseJsImport(startPos, attrs, p) {
function parseRecordPatternField (line 4586) | function parseRecordPatternField(p) {
function parseTypeParam (line 4596) | function parseTypeParam(p) {
function parseTypeConstructorArgs (line 4661) | function parseTypeConstructorArgs(constrName, p) {
function parseTypeRepresentation (line 4698) | function parseTypeRepresentation(p) {
function parseTypeConstructorDeclarations (line 4747) | function parseTypeConstructorDeclarations(first, p) {
function parseParameterList (line 4762) | function parseParameterList(p) {
function parseTypeConstraint (line 4768) | function parseTypeConstraint(p) {
function parseAttributesAndBinding (line 4813) | function parseAttributesAndBinding(p) {
function parseTypeDef (line 4855) | function parseTypeDef(attrs, startPos, p) {
function parseTypeEquationAndRepresentation (line 4881) | function parseTypeEquationAndRepresentation(p) {
function parseIfLetExpr (line 4960) | function parseIfLetExpr(startPos, p) {
function parseIfExpr (line 5011) | function parseIfExpr(startPos, p) {
function parseRecordOrObjectDecl (line 5038) | function parseRecordOrObjectDecl(p) {
function parseTypeEquationOrConstrDecl (line 5253) | function parseTypeEquationOrConstrDecl(p) {
function parseJsFfiDeclaration (line 5342) | function parseJsFfiDeclaration(p) {
function parseWithConstraint (line 5367) | function parseWithConstraint(p) {
function parseTypeParameter (line 5469) | function parseTypeParameter(p) {
function parseRecordDeclaration (line 5613) | function parseRecordDeclaration(p) {
function parseStructureItemRegion (line 5622) | function parseStructureItemRegion(p) {
function parseSignatureItemRegion (line 5821) | function parseSignatureItemRegion(p) {
function parseNonSpreadExp (line 6040) | function parseNonSpreadExp(msg, p) {
function parseTypeParameters (line 6067) | function parseTypeParameters(p) {
function parsePatternGuard (line 6100) | function parsePatternGuard(p) {
function parseRecModuleDeclaration (line 6112) | function parseRecModuleDeclaration(attrs, startPos, p) {
function parseEs6ArrowExpression (line 6142) | function parseEs6ArrowExpression(context, parameters, p) {
function parseRecordExprWithStringKeys (line 6193) | function parseRecordExprWithStringKeys(startPos, firstRow, p) {
function parseRecordExpr (line 6218) | function parseRecordExpr(startPos, spreadOpt, rows, p) {
function parseValueOrConstructor (line 6242) | function parseValueOrConstructor(p) {
function parseAtomicExpr (line 6384) | function parseAtomicExpr(p) {
function parseRecordPatternItem (line 6525) | function parseRecordPatternItem(p) {
function parsePackageConstraints (line 6562) | function parsePackageConstraints(p) {
function parseConstrainedExprRegion (line 6578) | function parseConstrainedExprRegion(p) {
function parseTagName (line 6600) | function parseTagName(p) {
function parseFunctorModuleType (line 6609) | function parseFunctorModuleType(p) {
function parseWithConstraints (line 6633) | function parseWithConstraints(moduleType, p) {
function parseAtomicModuleType (line 6675) | function parseAtomicModuleType(p) {
function parseFunctorArgs (line 6758) | function parseFunctorArgs(p) {
function parseFunctorArg (line 6782) | function parseFunctorArg(p) {
function parsePrivateEqOrRepr (line 6883) | function parsePrivateEqOrRepr(p) {
function parseAtomicModuleExpr (line 6940) | function parseAtomicModuleExpr(p) {
function parseModuleApplication (line 7025) | function parseModuleApplication(p, modExpr) {
function parseTemplateExpr (line 7054) | function parseTemplateExpr(prefixOpt, p) {
function parseCallExpr (line 7242) | function parseCallExpr(p, funExpr) {
function parseBracketAccess (line 7402) | function parseBracketAccess(p, expr, startPos) {
function parseRecordOrObjectType (line 7541) | function parseRecordOrObjectType(attrs, p) {
function parseAtomicTypExpr (line 7577) | function parseAtomicTypExpr(attrs, p) {
function skipTokensAndMaybeRetry (line 7711) | function skipTokensAndMaybeRetry(p, isStartOfGrammar) {
function parsePolymorphicVariantType (line 7741) | function parsePolymorphicVariantType(attrs, p) {
function parseTupleType (line 7816) | function parseTupleType(attrs, first, startPos, p) {
function parseTypeParams (line 7837) | function parseTypeParams(parent, p) {
function parseConstructorArgs (line 7884) | function parseConstructorArgs(p) {
function parseParameters (line 7907) | function parseParameters(p) {
function parseSignLetDesc (line 8042) | function parseSignLetDesc(attrs, p) {
function parseCoercedExpr (line 8058) | function parseCoercedExpr(expr, p) {
function parseMaybeRecModuleBinding (line 8071) | function parseMaybeRecModuleBinding(attrs, startPos, p) {
function parseModuleTypeImpl (line 8081) | function parseModuleTypeImpl(attrs, startPos, p) {
function parseIfCondition (line 8132) | function parseIfCondition(p) {
function parseIfOrIfLetExpression (line 8139) | function parseIfOrIfLetExpression(p) {
function parseElseBranch (line 8158) | function parseElseBranch(p) {
function parseThenBranch (line 8165) | function parseThenBranch(p) {
function parseRecordRowWithStringKey (line 8174) | function parseRecordRowWithStringKey(p) {
function parseModuleTypeOf (line 8209) | function parseModuleTypeOf(p) {
function parseParameter (line 8222) | function parseParameter(p) {
function parseExprBlockItem (line 8459) | function parseExprBlockItem(p) {
function parseJsxName (line 8593) | function parseJsxName(p) {
function parseJsxOpeningOrSelfClosingElement (line 8637) | function parseJsxOpeningOrSelfClosingElement(startPos, p) {
function parseJsxFragment (line 8779) | function parseJsxFragment(p) {
function parseTypeConstructorDeclarationWithBar (line 8795) | function parseTypeConstructorDeclarationWithBar(p) {
function parsePatternMatching (line 8805) | function parsePatternMatching(p) {
function parseJsxProp (line 8815) | function parseJsxProp(p) {
function parseTypeConstructorArgRegion (line 8901) | function parseTypeConstructorArgRegion(p) {
function parseModuleTypeDeclaration (line 8914) | function parseModuleTypeDeclaration(attrs, startPos, p) {
function parseNewlineOrSemicolonSignature (line 8959) | function parseNewlineOrSemicolonSignature(p) {
function parseModuleDeclarationOrAlias (line 8970) | function parseModuleDeclarationOrAlias(attrs, p) {
function parseSignJsExport (line 9024) | function parseSignJsExport(attrs, p) {
function parseRecModuleSpec (line 9076) | function parseRecModuleSpec(attrs, startPos, p) {
function parseEs6ArrowType (line 9101) | function parseEs6ArrowType(attrs, p) {
function parseJsxChildren (line 9181) | function parseJsxChildren(p) {
function parseConstrainedModExprRegion (line 9242) | function parseConstrainedModExprRegion(p) {
function parsePolyVariantExpr (line 9249) | function parsePolyVariantExpr(p) {
function parseJsx (line 9308) | function parseJsx(p) {
function parseListExpr (line 9337) | function parseListExpr(startPos, p) {
function parseArrayExp (line 9365) | function parseArrayExp(p) {
function parseTupleExpr (line 9379) | function parseTupleExpr(first, startPos, p) {
function parseBracedOrRecordExpr (line 9400) | function parseBracedOrRecordExpr(p) {
function parsePatternMatchCase (line 9928) | function parsePatternMatchCase(p) {
function parseAliasPattern (line 9954) | function parseAliasPattern(attrs, pattern, p) {
function parseTuplePattern (line 9970) | function parseTuplePattern(attrs, first, startPos, p) {
function parseForRest (line 9991) | function parseForRest(hasOpeningParen, pattern, startPos, p) {
function parseTypeDefinitions (line 10032) | function parseTypeDefinitions(attrs, name, params, startPos, p) {
function parseTypeExtension (line 10094) | function parseTypeExtension(params, attrs, name, p) {
function parseArgument2 (line 10137) | function parseArgument2(p, uncurried) {
function parseLetBindingBody (line 10315) | function parseLetBindingBody(startPos, attrs, p) {
function parseArgument (line 10385) | function parseArgument(p) {
function parsePrimaryModExpr (line 10409) | function parsePrimaryModExpr(p) {
function parseFunctorModuleExpr (line 10438) | function parseFunctorModuleExpr(p) {
function parseUnaryExpr (line 10469) | function parseUnaryExpr(p) {
function parseSwitchExpression (line 10495) | function parseSwitchExpression(p) {
function parseTryExpression (line 10511) | function parseTryExpression(p) {
function parseWhileExpression (line 10528) | function parseWhileExpression(p) {
function parseForExpression (line 10544) | function parseForExpression(p) {
function parseConstructorPatternArgs (line 10594) | function parseConstructorPatternArgs(p, constr, startPos, attrs) {
function parseRecordPattern (line 10651) | function parseRecordPattern(attrs, p) {
function parseModulePattern (line 10697) | function parseModulePattern(attrs, p) {
function parseListPattern (line 10742) | function parseListPattern(startPos, attrs, p) {
function parseVariantPatternArgs (line 10782) | function parseVariantPatternArgs(p, ident, startPos, attrs) {
function parseOrPattern (line 10839) | function parseOrPattern(pattern1, p) {
function parseArrayPattern (line 10863) | function parseArrayPattern(attrs, p) {
function parseJsFfiDeclarations (line 10879) | function parseJsFfiDeclarations(p) {
function parseJsFfiScope (line 10886) | function parseJsFfiScope(p) {
function parseJsxProps (line 10922) | function parseJsxProps(p) {
function parseTypeConstraints (line 10926) | function parseTypeConstraints(p) {
function parseAttributes (line 10930) | function parseAttributes(p) {
function parseSpecification (line 10934) | function parseSpecification(p) {
function parseImplementation (line 10938) | function parseImplementation(p) {
FILE: analysis/examples/larger-project/src/res_diagnostics.js
function getStartPos (line 11) | function getStartPos(t) {
function getEndPos (line 15) | function getEndPos(t) {
function defaultUnexpected (line 19) | function defaultUnexpected(token) {
function reservedKeyword (line 23) | function reservedKeyword(token) {
function explain (line 28) | function explain(t) {
function make (line 273) | function make(startPos, endPos, category) {
function printReport (line 281) | function printReport(diagnostics, src) {
function unexpected (line 312) | function unexpected(token, context) {
function expected (line 320) | function expected(grammar, pos, token) {
function uident (line 329) | function uident(currentToken) {
function lident (line 336) | function lident(currentToken) {
function unknownUchar (line 343) | function unknownUchar(code) {
function message (line 350) | function message(txt) {
FILE: analysis/examples/larger-project/src/res_diagnostics_printing_utils.js
function digits_count (line 18) | function digits_count(n) {
function seek_2_lines_before (line 34) | function seek_2_lines_before(src, pos) {
function seek_2_lines_after (line 53) | function seek_2_lines_after(src, pos) {
function leading_space_count (line 83) | function leading_space_count(str) {
function break_long_line (line 101) | function break_long_line(max_width, line) {
function filter_mapi (line 122) | function filter_mapi(f, l) {
function should_enable_color (line 153) | function should_enable_color(param) {
function setup (line 181) | function setup(o) {
function print (line 216) | function print(is_warning, src, startPos, endPos) {
function print$1 (line 410) | function print$1(message_kind, intro, src, ppf, loc) {
function super_error_reporter (line 466) | function super_error_reporter(ppf, src, param) {
FILE: analysis/examples/larger-project/src/res_doc.js
function text (line 18) | function text(s) {
function _concat (line 25) | function _concat(_acc, _l) {
function concat (line 78) | function concat(l) {
function indent (line 85) | function indent(d) {
function ifBreaks (line 92) | function ifBreaks(t, f) {
function lineSuffix (line 101) | function lineSuffix(d) {
function group (line 108) | function group(d) {
function breakableGroup (line 116) | function breakableGroup(forceBreak, d) {
function customLayout (line 124) | function customLayout(gs) {
function propagateForcedBreaks (line 143) | function propagateForcedBreaks(doc) {
function willBreak (line 200) | function willBreak(_doc) {
function join (line 244) | function join(sep, docs) {
function fits (line 278) | function fits(w, stack) {
function toString (line 397) | function toString(width, doc) {
function debug (line 640) | function debug(t) {
FILE: analysis/examples/larger-project/src/res_grammar.js
function toString (line 5) | function toString(x) {
function isSignatureItemStart (line 129) | function isSignatureItemStart(x) {
function isAtomicPatternStart (line 175) | function isAtomicPatternStart(x) {
function isAtomicExprStart (line 205) | function isAtomicExprStart(x) {
function isAtomicTypExprStart (line 238) | function isAtomicTypExprStart(x) {
function isExprStart (line 261) | function isExprStart(x) {
function isJsxAttributeStart (line 308) | function isJsxAttributeStart(x) {
function isStructureItemStart (line 322) | function isStructureItemStart(x) {
function isPatternStart (line 374) | function isPatternStart(x) {
function isParameterStart (line 412) | function isParameterStart(x) {
function isStringFieldDeclStart (line 431) | function isStringFieldDeclStart(x) {
function isFieldDeclStart (line 451) | function isFieldDeclStart(x) {
function isRecordDeclStart (line 479) | function isRecordDeclStart(x) {
function isTypExprStart (line 496) | function isTypExprStart(x) {
function isTypeParameterStart (line 522) | function isTypeParameterStart(x) {
function isTypeParamStart (line 536) | function isTypeParamStart(x) {
function isFunctorArgStart (line 548) | function isFunctorArgStart(x) {
function isModExprStart (line 568) | function isModExprStart(x) {
function isRecordRowStart (line 595) | function isRecordRowStart(x) {
function isRecordRowStringKeyStart (line 616) | function isRecordRowStringKeyStart(x) {
function isArgumentStart (line 624) | function isArgumentStart(x) {
function isPatternMatchStart (line 643) | function isPatternMatchStart(x) {
function isPatternOcamlListStart (line 651) | function isPatternOcamlListStart(x) {
function isPatternRecordItemStart (line 659) | function isPatternRecordItemStart(x) {
function isAttributeStart (line 679) | function isAttributeStart(x) {
function isJsFfiImportStart (line 683) | function isJsFfiImportStart(x) {
function isBlockExprStart (line 697) | function isBlockExprStart(x) {
function isListElement (line 748) | function isListElement(grammar, token) {
function isListTerminator (line 855) | function isListTerminator(grammar, token) {
function isPartOfList (line 1111) | function isPartOfList(grammar, token) {
FILE: analysis/examples/larger-project/src/res_js_ffi.js
function decl (line 9) | function decl(attrs, loc, name, alias, typ) {
function importDescr (line 19) | function importDescr(attrs, scope, importSpec, loc) {
function toParsetree (line 28) | function toParsetree(importDescr) {
FILE: analysis/examples/larger-project/src/res_minibuffer.js
function create (line 7) | function create(n) {
function contents (line 17) | function contents(b) {
function resize_internal (line 21) | function resize_internal(b, more) {
function add_char (line 37) | function add_char(b, c) {
function add_string (line 47) | function add_string(b, s) {
function flush_newline (line 58) | function flush_newline(b) {
FILE: analysis/examples/larger-project/src/res_parens.js
function expr (line 6) | function expr(expr$1) {
function callExpr (line 36) | function callExpr(expr) {
function structureExpr (line 92) | function structureExpr(expr) {
function unaryExprOperand (line 125) | function unaryExprOperand(expr) {
function binaryExprOperand (line 182) | function binaryExprOperand(isLhs, expr) {
function subBinaryExprOperand (line 251) | function subBinaryExprOperand(parentOperator, childOperator) {
function rhsBinaryExprOperand (line 263) | function rhsBinaryExprOperand(parentOperator, rhs) {
function flattenOperandRhs (line 311) | function flattenOperandRhs(parentOperator, rhs) {
function lazyOrAssertExprRhs (line 382) | function lazyOrAssertExprRhs(expr) {
function isNegativeConstant (line 438) | function isNegativeConstant(constant) {
function fieldExpr (line 462) | function fieldExpr(expr) {
function setFieldExprRhs (line 525) | function setFieldExprRhs(expr) {
function ternaryOperand (line 555) | function ternaryOperand(expr) {
function startsWithMinus (line 597) | function startsWithMinus(txt) {
function jsxPropExpr (line 606) | function jsxPropExpr(expr) {
function jsxChildExpr (line 707) | function jsxChildExpr(expr) {
function binaryExpr (line 817) | function binaryExpr(expr) {
function modTypeFunctorReturn (line 831) | function modTypeFunctorReturn(modType) {
function modTypeWithOperand (line 839) | function modTypeWithOperand(modType) {
function modExprFunctorConstraint (line 849) | function modExprFunctorConstraint(modType) {
function bracedExpr (line 859) | function bracedExpr(expr) {
function includeModExpr (line 882) | function includeModExpr(modExpr) {
function arrowReturnTypExpr (line 891) | function arrowReturnTypExpr(typExpr) {
function patternRecordRowRhs (line 900) | function patternRecordRowRhs(pattern) {
FILE: analysis/examples/larger-project/src/res_parser.js
function err (line 11) | function err(startPos, endPos, p, error) {
function beginRegion (line 30) | function beginRegion(p) {
function endRegion (line 40) | function endRegion(p) {
function next (line 49) | function next(_prevEndPos, p) {
function nextUnsafe (line 87) | function nextUnsafe(p) {
function nextTemplateLiteralToken (line 94) | function nextTemplateLiteralToken(p) {
function checkProgress (line 103) | function checkProgress(prevEndPos, result, p) {
function make (line 111) | function make(modeOpt, src, filename) {
function leaveBreadcrumb (line 144) | function leaveBreadcrumb(p, circumstance) {
function eatBreadcrumb (line 157) | function eatBreadcrumb(p) {
function optional (line 166) | function optional(p, token) {
function expect (line 175) | function expect(grammar, token, p) {
function lookahead (line 183) | function lookahead(p, callback) {
FILE: analysis/examples/larger-project/src/res_parsetree_viewer.js
function arrowType (line 5) | function arrowType(ct) {
function functorType (line 92) | function functorType(modtype) {
function processUncurriedAttribute (line 122) | function processUncurriedAttribute(attrs) {
function collectListExpressions (line 151) | function collectListExpressions(expr) {
function rewriteUnderscoreApply (line 208) | function rewriteUnderscoreApply(expr) {
function funExpr (line 291) | function funExpr(expr) {
function processBracesAttr (line 454) | function processBracesAttr(expr) {
function filterParsingAttrs (line 480) | function filterParsingAttrs(attrs) {
function isBlockExpr (line 496) | function isBlockExpr(expr) {
function isBracedExpr (line 513) | function isBracedExpr(expr) {
function isMultilineText (line 518) | function isMultilineText(txt) {
function isHuggableExpression (line 546) | function isHuggableExpression(expr) {
function isHuggableRhs (line 611) | function isHuggableRhs(expr) {
function isHuggablePattern (line 657) | function isHuggablePattern(pattern) {
function operatorPrecedence (line 674) | function operatorPrecedence(operator) {
function isUnaryOperator (line 715) | function isUnaryOperator(operator) {
function isUnaryExpression (line 728) | function isUnaryExpression(expr) {
function isBinaryOperator (line 759) | function isBinaryOperator(operator) {
function isBinaryExpression (line 791) | function isBinaryExpression(expr) {
function isEqualityOperator (line 840) | function isEqualityOperator(operator) {
function flattenableOperators (line 852) | function flattenableOperators(parentOperator, childOperator) {
function hasIfLetAttribute (line 862) | function hasIfLetAttribute(_attrs) {
function isIfLetExpr (line 876) | function isIfLetExpr(expr) {
function hasAttributes (line 885) | function hasAttributes(attrs) {
function isArrayAccess (line 926) | function isArrayAccess(expr) {
function collectIfExpressions (line 978) | function collectIfExpressions(expr) {
function hasTernaryAttribute (line 1104) | function hasTernaryAttribute(_attrs) {
function isTernaryExpr (line 1118) | function isTernaryExpr(expr) {
function collectTernaryParts (line 1127) | function collectTernaryParts(expr) {
function parametersShouldHug (line 1171) | function parametersShouldHug(parameters) {
function filterTernaryAttributes (line 1183) | function filterTernaryAttributes(attrs) {
function filterFragileMatchAttributes (line 1193) | function filterFragileMatchAttributes(attrs) {
function isJsxExpression (line 1226) | function isJsxExpression(expr) {
function hasJsxAttribute (line 1246) | function hasJsxAttribute(attributes) {
function shouldIndentBinaryExpr (line 1261) | function shouldIndentBinaryExpr(expr) {
function shouldInlineRhsBinaryExpr (line 1361) | function shouldInlineRhsBinaryExpr(rhs) {
function isPrintableAttribute (line 1385) | function isPrintableAttribute(attr) {
function hasPrintableAttributes (line 1399) | function hasPrintableAttributes(attrs) {
function filterPrintableAttributes (line 1403) | function filterPrintableAttributes(attrs) {
function partitionPrintableAttributes (line 1407) | function partitionPrintableAttributes(attrs) {
function requiresSpecialCallbackPrintingLastArg (line 1411) | function requiresSpecialCallbackPrintingLastArg(args) {
function requiresSpecialCallbackPrintingFirstArg (line 1438) | function requiresSpecialCallbackPrintingFirstArg(args) {
function modExprApply (line 1480) | function modExprApply(modExpr) {
function modExprFunctor (line 1502) | function modExprFunctor(modExpr) {
function collectPatternsFromListConstruct (line 1532) | function collectPatternsFromListConstruct(_acc, _pattern) {
function hasTemplateLiteralAttr (line 1615) | function hasTemplateLiteralAttr(attrs) {
function isTemplateLiteral (line 1625) | function isTemplateLiteral(expr) {
function collectOrPatternChain (line 1682) | function collectOrPatternChain(pat) {
function isSinglePipeExpr (line 1710) | function isSinglePipeExpr(expr) {
function isUnderscoreApplySugar (line 1802) | function isUnderscoreApplySugar(expr) {
function isRewrittenUnderscoreApplySugar (line 1834) | function isRewrittenUnderscoreApplySugar(expr) {
FILE: analysis/examples/larger-project/src/res_printer.js
function convertBsExternalAttribute (line 20) | function convertBsExternalAttribute(x) {
function convertBsExtension (line 74) | function convertBsExtension(x) {
function addParens (line 90) | function addParens(doc) {
function addBraces (line 112) | function addBraces(doc) {
function getFirstLeadingComment (line 134) | function getFirstLeadingComment(tbl, loc) {
function hasLeadingLineComment (line 152) | function hasLeadingLineComment(tbl, loc) {
function hasCommentBelow (line 161) | function hasCommentBelow(tbl, loc) {
function printMultilineCommentContent (line 180) | function printMultilineCommentContent(txt) {
function printTrailingComment (line 276) | function printTrailingComment(prevLoc, nodeLoc, comment) {
function printLeadingComment (line 319) | function printLeadingComment(nextComment, comment) {
function printCommentsInside (line 371) | function printCommentsInside(cmtTbl, loc) {
function printLeadingComments (line 415) | function printLeadingComments(node, tbl, loc) {
function printTrailingComments (line 478) | function printTrailingComments(node, tbl, loc) {
function printComments (line 523) | function printComments(doc, tbl, loc) {
function printList (line 528) | function printList(getLoc, nodes, print, forceBreakOpt, t) {
function printListi (line 579) | function printListi(getLoc, nodes, print, forceBreakOpt, t) {
function printLongidentAux (line 632) | function printLongidentAux(_accu, _x) {
function printLongident (line 673) | function printLongident(x) {
function classifyIdentContent (line 684) | function classifyIdentContent(allowUidentOpt, txt) {
function printIdentLike (line 744) | function printIdentLike(allowUident, txt) {
function unsafe_for_all_range (line 762) | function unsafe_for_all_range(s, _start, finish, p) {
function for_all_from (line 776) | function for_all_from(s, start, p) {
function isValidNumericPolyvarNumber (line 781) | function isValidNumericPolyvarNumber(x) {
function printPolyVarIdent (line 804) | function printPolyVarIdent(txt) {
function printLident (line 825) | function printLident(l) {
function printLongidentLocation (line 876) | function printLongidentLocation(l, cmtTbl) {
function printLidentPath (line 881) | function printLidentPath(path, cmtTbl) {
function printIdentPath (line 886) | function printIdentPath(path, cmtTbl) {
function printStringLoc (line 891) | function printStringLoc(sloc, cmtTbl) {
function printStringContents (line 896) | function printStringContents(txt) {
function printConstant (line 901) | function printConstant(templateLiteralOpt, c) {
function printStructure (line 1022) | function printStructure(s, t) {
function printStructureItem (line 1032) | function printStructureItem(si, cmtTbl) {
function printTypeExtension (line 1101) | function printTypeExtension(te, cmtTbl) {
function printModuleBinding (line 1156) | function printModuleBinding(isRec, moduleBinding, cmtTbl, i) {
function printModuleTypeDeclaration (line 1204) | function printModuleTypeDeclaration(modTypeDecl, cmtTbl) {
function printModType (line 1229) | function printModType(modType, cmtTbl) {
function printWithConstraints (line 1484) | function printWithConstraints(withConstraints, cmtTbl) {
function printWithConstraint (line 1497) | function printWithConstraint(withConstraint, cmtTbl) {
function printSignature (line 1547) | function printSignature(signature, cmtTbl) {
function printSignatureItem (line 1557) | function printSignatureItem(si, cmtTbl) {
function printRecModuleDeclarations (line 1605) | function printRecModuleDeclarations(moduleDeclarations, cmtTbl) {
function printRecModuleDeclaration (line 1611) | function printRecModuleDeclaration(md, cmtTbl, i) {
function printModuleDeclaration (line 1652) | function printModuleDeclaration(md, cmtTbl) {
function printOpenDescription (line 1683) | function printOpenDescription(openDescription, cmtTbl) {
function printIncludeDescription (line 1700) | function printIncludeDescription(includeDescription, cmtTbl) {
function printIncludeDeclaration (line 1713) | function printIncludeDeclaration(includeDeclaration, cmtTbl) {
function printValueBindings (line 1727) | function printValueBindings(recFlag, vbs, cmtTbl) {
function printValueDescription (line 1735) | function printValueDescription(valueDescription, cmtTbl) {
function printTypeDeclarations (line 1784) | function printTypeDeclarations(recFlag, typeDeclarations, cmtTbl) {
function printTypeDeclaration (line 1792) | function printTypeDeclaration(name, equalSign, recFlag, i, td, cmtTbl) {
function printTypeDeclaration2 (line 1944) | function printTypeDeclaration2(recFlag, td, cmtTbl, i) {
function printTypeDefinitionConstraints (line 2099) | function printTypeDefinitionConstraints(cstrs) {
function printTypeDefinitionConstraint (line 2113) | function printTypeDefinitionConstraint(param) {
function printPrivateFlag (line 2129) | function printPrivateFlag(flag) {
function printTypeParams (line 2137) | function printTypeParams(typeParams, cmtTbl) {
function printTypeParam (line 2175) | function printTypeParam(param, cmtTbl) {
function printRecordDeclaration (line 2198) | function printRecordDeclaration(lds, cmtTbl) {
function printConstructorDeclarations (line 2234) | function printConstructorDeclarations(privateFlag, cds, cmtTbl) {
function printConstructorDeclaration2 (line 2262) | function printConstructorDeclaration2(i, cd, cmtTbl) {
function printConstructorArguments (line 2297) | function printConstructorArguments(indent, cdArgs, cmtTbl) {
function printLabelDeclaration (line 2379) | function printLabelDeclaration(ld, cmtTbl) {
function printTypExpr (line 2403) | function printTypExpr(typExpr, cmtTbl) {
function printObject (line 2895) | function printObject(inline, fields, openFlag, cmtTbl) {
function printTupleType (line 2954) | function printTupleType(inline, types, cmtTbl) {
function printObjectField (line 2992) | function printObjectField(field, cmtTbl) {
function printTypeParameter (line 3031) | function printTypeParameter(param, cmtTbl) {
function printValueBinding (line 3105) | function printValueBinding(recFlag, vb, cmtTbl, i) {
function printPackageType (line 3373) | function printPackageType(printModuleKeywordAndParens, packageType, cmtT...
function printPackageConstraints (line 3405) | function printPackageConstraints(packageConstraints, cmtTbl) {
function printPackageConstraint (line 3433) | function printPackageConstraint(i, cmtTbl, param) {
function printExtension (line 3450) | function printExtension(atModuleLvl, param, cmtTbl) {
function printPattern (line 3473) | function printPattern(p, cmtTbl) {
function printPatternRecordRow (line 4294) | function printPatternRecordRow(row, cmtTbl) {
function printExpressionWithComments (line 4346) | function printExpressionWithComments(expr, cmtTbl) {
function printIfChain (line 4351) | function printIfChain(pexp_attributes, ifs, elseExpr, cmtTbl) {
function printExpression (line 4433) | function printExpression(e, cmtTbl) {
function printPexpFun (line 5677) | function printPexpFun(inCallback, e, cmtTbl) {
function printTernaryOperand (line 5801) | function printTernaryOperand(expr, cmtTbl) {
function printSetFieldExpr (line 5815) | function printSetFieldExpr(attrs, lhs, longidentLoc, rhs, loc, cmtTbl) {
function printTemplateLiteral (line 5865) | function printTemplateLiteral(expr, cmtTbl) {
function printUnaryExpression (line 5957) | function printUnaryExpression(expr, cmtTbl) {
function printBinaryExpression (line 6037) | function printBinaryExpression(expr, cmtTbl) {
function printPexpApply (line 6468) | function printPexpApply(expr, cmtTbl) {
function printJsxExpression (line 6940) | function printJsxExpression(lident, args, cmtTbl) {
function printJsxFragment (line 7019) | function printJsxFragment(expr, cmtTbl) {
function printJsxChildren (line 7068) | function printJsxChildren(childrenExpr, cmtTbl) {
function printJsxProps (line 7147) | function printJsxProps(args, cmtTbl) {
function printJsxProp (line 7207) | function printJsxProp(arg, cmtTbl) {
function printJsxName (line 7388) | function printJsxName(param) {
function printArgumentsWithCallbackInFirstPosition (line 7427) | function printArgumentsWithCallbackInFirstPosition(uncurried, args, cmtT...
function printArgumentsWithCallbackInLastPosition (line 7525) | function printArgumentsWithCallbackInLastPosition(uncurried, args, cmtTb...
function printArguments (line 7653) | function printArguments(uncurried, args, cmtTbl) {
function printArgument (line 7744) | function printArgument(param, cmtTbl) {
function printCases (line 7964) | function printCases(cases, cmtTbl) {
function printCase (line 7993) | function printCase($$case, cmtTbl) {
function printExprFunParameters (line 8108) | function printExprFunParameters(inCallback, uncurried, hasConstraint, pa...
function printExpFunParameter (line 8192) | function printExpFunParameter(parameter, cmtTbl) {
function printExpressionBlock (line 8370) | function printExpressionBlock(braces, expr, cmtTbl) {
function printBraces (line 8609) | function printBraces(doc, expr, bracesLoc) {
function printOverrideFlag (line 8645) | function printOverrideFlag(overrideFlag) {
function printDirectionFlag (line 8653) | function printDirectionFlag(flag) {
function printRecordRow (line 8661) | function printRecordRow(param, cmtTbl, punningAllowed) {
function printBsObjectRow (line 8716) | function printBsObjectRow(param, cmtTbl) {
function printAttributes (line 8756) | function printAttributes(loc, inlineOpt, attrs, cmtTbl) {
function printPayload (line 8780) | function printPayload(payload, cmtTbl) {
function printAttribute (line 8933) | function printAttribute(param, cmtTbl) {
function printModExpr (line 8946) | function printModExpr(modExpr, cmtTbl) {
function printModFunctor (line 9163) | function printModFunctor(modExpr, cmtTbl) {
function printModFunctorParam (line 9262) | function printModFunctorParam(param, cmtTbl) {
function printModApplyArg (line 9298) | function printModApplyArg(modExpr, cmtTbl) {
function printExceptionDef (line 9307) | function printExceptionDef(constr, cmtTbl) {
function printExtensionConstructor (line 9365) | function printExtensionConstructor(constr, cmtTbl, i) {
function printImplementation (line 9427) | function printImplementation(width, s, comments) {
function printInterface (line 9434) | function printInterface(width, s, comments) {
FILE: analysis/examples/larger-project/src/res_scanner.js
function setDiamondMode (line 14) | function setDiamondMode(scanner) {
function setJsxMode (line 22) | function setJsxMode(scanner) {
function popMode (line 30) | function popMode(scanner, mode) {
function inDiamondMode (line 39) | function inDiamondMode(scanner) {
function inJsxMode (line 48) | function inJsxMode(scanner) {
function position (line 57) | function position(scanner) {
function _printDebug (line 66) | function _printDebug(startPos, endPos, scanner, token) {
function next (line 98) | function next(scanner) {
function next2 (line 117) | function next2(scanner) {
function next3 (line 122) | function next3(scanner) {
function peek (line 128) | function peek(scanner) {
function peek2 (line 136) | function peek2(scanner) {
function make (line 144) | function make(filename, src) {
function isWhitespace (line 159) | function isWhitespace(ch) {
function skipWhitespace (line 167) | function skipWhitespace(scanner) {
function digitValue (line 177) | function digitValue(ch) {
function skipLowerCaseChars (line 197) | function skipLowerCaseChars(scanner) {
function scanIdentifier (line 208) | function scanIdentifier(scanner) {
function scanDigits (line 251) | function scanDigits(scanner, base) {
function scanNumber (line 300) | function scanNumber(scanner) {
function scanExoticIdentifier (line 412) | function scanExoticIdentifier(scanner) {
function scanStringEscapeSequence (line 446) | function scanStringEscapeSequence(startPos, scanner) {
function scanString (line 567) | function scanString(scanner) {
function scanEscape (line 602) | function scanEscape(scanner) {
function scanSingleLineComment (line 713) | function scanSingleLineComment(scanner) {
function scanMultiLineComment (line 744) | function scanMultiLineComment(scanner) {
function scanTemplateLiteralToken (line 790) | function scanTemplateLiteralToken(scanner) {
function scan (line 883) | function scan(scanner) {
function reconsiderLessThan (line 1357) | function reconsiderLessThan(scanner) {
function isBinaryOp (line 1367) | function isBinaryOp(src, startCnum, endCnum) {
function tryAdvanceQuotedString (line 1402) | function tryAdvanceQuotedString(scanner) {
FILE: analysis/examples/larger-project/src/res_token.js
function precedence (line 7) | function precedence(x) {
function toString (line 95) | function toString(x) {
function keywordTable (line 294) | function keywordTable(x) {
function isKeyword (line 362) | function isKeyword(x) {
function lookupKeyword (line 386) | function lookupKeyword(str) {
function isKeywordTxt (line 410) | function isKeywordTxt(str) {
FILE: analysis/examples/larger-project/src/res_utf8.js
function decodeCodePoint (line 312) | function decodeCodePoint(i, s, len) {
function encodeCodePoint (line 394) | function encodeCodePoint(c) {
function isValidCodePoint (line 433) | function isValidCodePoint(c) {
FILE: analysis/examples/larger-project/src/syntaxerr.js
function prepare_error (line 12) | function prepare_error(x) {
function report_error (line 47) | function report_error(ppf, err) {
function location_of_error (line 51) | function location_of_error(x) {
function ill_formed_ast (line 55) | function ill_formed_ast(loc, s) {
FILE: analysis/examples/larger-project/src/warnings.js
function number (line 17) | function number(x) {
function letter (line 153) | function letter(x) {
function without_warnings (line 337) | function without_warnings(f) {
function backup (line 347) | function backup(param) {
function restore (line 351) | function restore(x) {
function is_active (line 356) | function is_active(x) {
function is_error (line 364) | function is_error(x) {
function mk_lazy (line 372) | function mk_lazy(f) {
function parse_opt (line 392) | function parse_opt(error, active, flags, s) {
function parse_options (line 562) | function parse_options(errflag, s) {
function message (line 581) | function message(x) {
function sub_locs (line 871) | function sub_locs(x) {
function report (line 895) | function report(w) {
function reset_fatal (line 916) | function reset_fatal(param) {
function check_fatal (line 921) | function check_fatal(param) {
function help_warnings (line 1306) | function help_warnings(param) {
FILE: analysis/examples/monorepo-project/packages/app/src/App.mjs
function main (line 5) | function main() {
function unusedAppFunction (line 12) | function unusedAppFunction() {
FILE: analysis/examples/rescript9-project/src/Hello.bs.js
function add (line 4) | function add(a, b) {
FILE: analysis/examples/workspace-project/common/src/Utils.mjs
function printError (line 4) | function printError(error) {
FILE: analysis/examples/workspace-project/myplugin/src/Promise.mjs
function $$catch (line 9) | function $$catch(promise, callback) {
FILE: analysis/reanalyze/examples/deadcode/src/BucklescriptAnnotations.bs.js
function bar (line 4) | function bar(x) {
FILE: analysis/reanalyze/examples/deadcode/src/ComponentAsProp.bs.js
function ComponentAsProp (line 6) | function ComponentAsProp(Props) {
FILE: analysis/reanalyze/examples/deadcode/src/CreateErrorHandler1.bs.js
function notification (line 6) | function notification(s) {
FILE: analysis/reanalyze/examples/deadcode/src/CreateErrorHandler2.bs.js
function notification (line 5) | function notification(n) {
FILE: analysis/reanalyze/examples/deadcode/src/DeadTest.bs.js
function unusedRec (line 36) | function unusedRec(_param) {
function split_map (line 43) | function split_map(l) {
function rec1 (line 48) | function rec1(_param) {
function rec2 (line 55) | function rec2(_param) {
function recWithCallback (line 62) | function recWithCallback(_param) {
function foo (line 69) | function foo(_param) {
function bar (line 76) | function bar(param) {
function withDefaultValue (line 80) | function withDefaultValue(paramWithDefaultOpt, y) {
function makeProps (line 93) | function makeProps(prim0, prim1, prim2) {
function make (line 103) | function make(props) {
function DeadTest (line 130) | function DeadTest(Props) {
function funWithInnerVars (line 150) | function funWithInnerVars(param) {
FILE: analysis/reanalyze/examples/deadcode/src/Docstrings.bs.js
function signMessage (line 4) | function signMessage(message, key) {
function one (line 8) | function one(a) {
function two (line 12) | function two(a, b) {
function tree (line 16) | function tree(a, b, c) {
function oneU (line 20) | function oneU(a) {
function twoU (line 24) | function twoU(a, b) {
function treeU (line 28) | function treeU(a, b, c) {
function useParam (line 32) | function useParam(param) {
function useParamU (line 36) | function useParamU(param) {
function unnamed1 (line 40) | function unnamed1(param) {
function unnamed1U (line 44) | function unnamed1U(param) {
function unnamed2 (line 48) | function unnamed2(param, param$1) {
function unnamed2U (line 52) | function unnamed2U(param, param$1) {
function grouped (line 56) | function grouped(x, y, a, b, c, z) {
function unitArgWithoutConversion (line 60) | function unitArgWithoutConversion(param) {
function unitArgWithoutConversionU (line 64) | function unitArgWithoutConversionU() {
function unitArgWithConversion (line 68) | function unitArgWithConversion(param) {
function unitArgWithConversionU (line 72) | function unitArgWithConversionU() {
FILE: analysis/reanalyze/examples/deadcode/src/DynamicallyLoadedComponent.bs.js
function DynamicallyLoadedComponent (line 4) | function DynamicallyLoadedComponent(Props) {
FILE: analysis/reanalyze/examples/deadcode/src/EmptyArray.bs.js
function EmptyArray$Z (line 5) | function EmptyArray$Z(Props) {
FILE: analysis/reanalyze/examples/deadcode/src/ErrorHandler.bs.js
function Make (line 5) | function Make($$Error) {
FILE: analysis/reanalyze/examples/deadcode/src/FC.bs.js
function foo (line 4) | function foo(impl) {
FILE: analysis/reanalyze/examples/deadcode/src/FirstClassModules.bs.js
function k3 (line 12) | function k3(x) {
function testConvert (line 45) | function testConvert(m) {
function SomeFunctor (line 49) | function SomeFunctor(X) {
function someFunctorAsFunction (line 55) | function someFunctorAsFunction(x) {
FILE: analysis/reanalyze/examples/deadcode/src/Hooks.bs.js
function Hooks (line 8) | function Hooks(Props) {
function Hooks$anotherComponent (line 42) | function Hooks$anotherComponent(Props) {
function Hooks$Inner (line 49) | function Hooks$Inner(Props) {
function Hooks$Inner$anotherComponent (line 54) | function Hooks$Inner$anotherComponent(Props) {
function Hooks$Inner$Inner2 (line 59) | function Hooks$Inner$Inner2(Props) {
function Hooks$Inner$Inner2$anotherComponent (line 64) | function Hooks$Inner$Inner2$anotherComponent(Props) {
function Hooks$NoProps (line 80) | function Hooks$NoProps(Props) {
function functionWithRenamedArgs (line 88) | function functionWithRenamedArgs(_to, _Type, cb) {
function Hooks$componentWithRenamedArgs (line 93) | function Hooks$componentWithRenamedArgs(Props) {
function Hooks$makeWithRef (line 101) | function Hooks$makeWithRef(Props) {
function Hooks$polymorphicComponent (line 125) | function Hooks$polymorphicComponent(Props) {
function Hooks$functionReturningReactElement (line 130) | function Hooks$functionReturningReactElement(Props) {
function Hooks$RenderPropRequiresConversion (line 134) | function Hooks$RenderPropRequiresConversion(Props) {
function Hooks$aComponentWithChildren (line 148) | function Hooks$aComponentWithChildren(Props) {
FILE: analysis/reanalyze/examples/deadcode/src/ImmutableArray.bs.js
function fromArray (line 5) | function fromArray(a) {
function toArray (line 9) | function toArray(a) {
function length (line 13) | function length(a) {
function size (line 17) | function size(a) {
function getUnsafe (line 25) | function getUnsafe(a, x) {
function getUndefined (line 29) | function getUndefined(a, x) {
function makeUninitialized (line 37) | function makeUninitialized(x) {
function makeUninitializedUnsafe (line 41) | function makeUninitializedUnsafe(x) {
function copy (line 75) | function copy(a) {
FILE: analysis/reanalyze/examples/deadcode/src/ImportHooks.bs.js
function foo (line 7) | function foo(prim) {
FILE: analysis/reanalyze/examples/deadcode/src/ImportJsValue.bs.js
function round (line 6) | function round(prim) {
function area (line 10) | function area(prim) {
function returnMixedArray (line 14) | function returnMixedArray(prim) {
function getAbs (line 25) | function getAbs(x) {
function useGetProp (line 33) | function useGetProp(x) {
function useGetAbs (line 37) | function useGetAbs(x) {
function useColor (line 41) | function useColor(prim) {
function higherOrder (line 45) | function higherOrder(prim) {
function convertVariant (line 53) | function convertVariant(prim) {
function polymorphic (line 57) | function polymorphic(prim) {
FILE: analysis/reanalyze/examples/deadcode/src/ImportMyBanner.bs.js
function make (line 6) | function make(prim0, prim1, prim2) {
FILE: analysis/reanalyze/examples/deadcode/src/JsxV4.bs.js
function JsxV4$C (line 5) | function JsxV4$C(props) {
FILE: analysis/reanalyze/examples/deadcode/src/ModuleAliases.bs.js
function testNested (line 22) | function testNested(x) {
function testInner (line 26) | function testInner(x) {
function testInner2 (line 30) | function testInner2(x) {
FILE: analysis/reanalyze/examples/deadcode/src/ModuleExceptionBug.bs.js
function customDouble (line 5) | function customDouble(foo) {
FILE: analysis/reanalyze/examples/deadcode/src/NestedModules.bs.js
function nested3Function (line 4) | function nested3Function(x) {
function nested2Function (line 17) | function nested2Function(x) {
FILE: analysis/reanalyze/examples/deadcode/src/Newton.bs.js
function $neg (line 5) | function $neg(prim0, prim1) {
function $plus (line 9) | function $plus(prim0, prim1) {
function $star (line 13) | function $star(prim0, prim1) {
function $slash (line 17) | function $slash(prim0, prim1) {
function newton (line 21) | function newton(f, fPrimed, initial, threshold) {
function f (line 42) | function f(x) {
function fPrimed (line 46) | function fPrimed(x) {
FILE: analysis/reanalyze/examples/deadcode/src/Opaque.bs.js
function noConversion (line 4) | function noConversion(x) {
function testConvertNestedRecordFromOtherFile (line 8) | function testConvertNestedRecordFromOtherFile(x) {
FILE: analysis/reanalyze/examples/deadcode/src/OptArg.bs.js
function foo (line 4) | function foo(xOpt, yOpt, zOpt, w) {
function bar (line 11) | function bar(x, y, z, w) {
function threeArgs (line 19) | function threeArgs(aOpt, bOpt, cOpt, d) {
function twoArgs (line 30) | function twoArgs(aOpt, bOpt, c) {
function wrapfourArgs (line 42) | function wrapfourArgs(a, b, c, n) {
FILE: analysis/reanalyze/examples/deadcode/src/Records.bs.js
function computeArea (line 9) | function computeArea(param) {
function coord2d (line 15) | function coord2d(x, y) {
function findAddress (line 25) | function findAddress(business) {
function findAllAddresses (line 34) | function findAllAddresses(businesses) {
function getPayload (line 52) | function getPayload(param) {
function getPayloadRecord (line 56) | function getPayloadRecord(param) {
function getPayloadRecordPlusOne (line 70) | function getPayloadRecordPlusOne(param) {
function findAddress2 (line 78) | function findAddress2(business) {
function computeArea3 (line 97) | function computeArea3(o) {
function computeArea4 (line 103) | function computeArea4(o) {
function testMyRec (line 109) | function testMyRec(x) {
function testMyRec2 (line 113) | function testMyRec2(x) {
function testMyObj (line 117) | function testMyObj(x) {
function testMyObj2 (line 121) | function testMyObj2(x) {
function testMyRecBsAs (line 125) | function testMyRecBsAs(x) {
function testMyRecBsAs2 (line 129) | function testMyRecBsAs2(x) {
FILE: analysis/reanalyze/examples/deadcode/src/References.bs.js
function create (line 4) | function create(x) {
function access (line 10) | function access(r) {
function update (line 14) | function update(r) {
function get (line 18) | function get(r) {
function make (line 22) | function make(prim) {
function set (line 28) | function set(r, v) {
function destroysRefIdentity (line 38) | function destroysRefIdentity(x) {
function preserveRefIdentity (line 42) | function preserveRefIdentity(x) {
FILE: analysis/reanalyze/examples/deadcode/src/RepeatedLabel.bs.js
function userData (line 4) | function userData(param) {
FILE: analysis/reanalyze/examples/deadcode/src/Shadow.bs.js
function test (line 4) | function test(param) {
function test$1 (line 8) | function test$1(param) {
FILE: analysis/reanalyze/examples/deadcode/src/TestFirstClassModules.bs.js
function convert (line 4) | function convert(x) {
function convertInterface (line 8) | function convertInterface(x) {
function convertRecord (line 12) | function convertRecord(x) {
function convertFirstClassModuleWithTypeEquations (line 16) | function convertFirstClassModuleWithTypeEquations(x) {
FILE: analysis/reanalyze/examples/deadcode/src/TestImmutableArray.bs.js
function testImmutableArrayGet (line 6) | function testImmutableArrayGet(arr) {
function testBeltArrayGet (line 10) | function testBeltArrayGet(arr) {
function testBeltArraySet (line 14) | function testBeltArraySet(arr) {
FILE: analysis/reanalyze/examples/deadcode/src/TestImport.bs.js
function make (line 14) | function make(prim0, prim1, prim2) {
FILE: analysis/reanalyze/examples/deadcode/src/TestModuleAliases.bs.js
function testInner1 (line 4) | function testInner1(x) {
function testInner1Expanded (line 8) | function testInner1Expanded(x) {
function testInner2 (line 12) | function testInner2(x) {
function testInner2Expanded (line 16) | function testInner2Expanded(x) {
FILE: analysis/reanalyze/examples/deadcode/src/TestOptArg.bs.js
function foo (line 7) | function foo(xOpt, y) {
function bar (line 12) | function bar(param) {
function notSuppressesOptArgs (line 19) | function notSuppressesOptArgs(xOpt, yOpt, zOpt, w) {
function liveSuppressesOptArgs (line 28) | function liveSuppressesOptArgs(xOpt, yOpt, zOpt, w) {
FILE: analysis/reanalyze/examples/deadcode/src/TestPromise.bs.js
function convert (line 5) | function convert(param) {
FILE: analysis/reanalyze/examples/deadcode/src/TransitiveType1.bs.js
function convert (line 4) | function convert(x) {
function convertAlias (line 8) | function convertAlias(x) {
FILE: analysis/reanalyze/examples/deadcode/src/TransitiveType2.bs.js
function convertT2 (line 4) | function convertT2(x) {
FILE: analysis/reanalyze/examples/deadcode/src/TransitiveType3.bs.js
function convertT3 (line 4) | function convertT3(x) {
FILE: analysis/reanalyze/examples/deadcode/src/Tuples.bs.js
function testTuple (line 5) | function testTuple(param) {
function computeArea (line 9) | function computeArea(param) {
function computeAreaWithIdent (line 15) | function computeAreaWithIdent(param) {
function computeAreaNoConverters (line 21) | function computeAreaNoConverters(param) {
function coord2d (line 25) | function coord2d(x, y) {
function getFirstName (line 33) | function getFirstName(param) {
function marry (line 37) | function marry(first, second) {
function changeSecondAge (line 44) | function changeSecondAge(param) {
FILE: analysis/reanalyze/examples/deadcode/src/TypeParams3.bs.js
function test (line 4) | function test(x) {
function test2 (line 8) | function test2(x) {
FILE: analysis/reanalyze/examples/deadcode/src/Types.bs.js
function swap (line 7) | function swap(tree) {
function selfRecursiveConverter (line 15) | function selfRecursiveConverter(param) {
function mutuallyRecursiveConverter (line 19) | function mutuallyRecursiveConverter(param) {
function testFunctionOnOptionsAsArgument (line 23) | function testFunctionOnOptionsAsArgument(a, foo) {
function jsonStringify (line 27) | function jsonStringify(prim) {
function testConvertNull (line 31) | function testConvertNull(x) {
function setMatch (line 47) | function setMatch(x) {
function testInstantiateTypeParameter (line 51) | function testInstantiateTypeParameter(x) {
FILE: analysis/reanalyze/examples/deadcode/src/Unboxed.bs.js
function testV1 (line 4) | function testV1(x) {
function r2Test (line 8) | function r2Test(x) {
FILE: analysis/reanalyze/examples/deadcode/src/Uncurried.bs.js
function uncurried0 (line 5) | function uncurried0() {
function uncurried1 (line 9) | function uncurried1(x) {
function uncurried2 (line 13) | function uncurried2(x, y) {
function uncurried3 (line 17) | function uncurried3(x, y, z) {
function curried3 (line 21) | function curried3(x, y, z) {
function callback (line 25) | function callback(cb) {
function callback2 (line 29) | function callback2(auth) {
function callback2U (line 33) | function callback2U(auth) {
function sumU (line 37) | function sumU(n, m) {
function sumU2 (line 41) | function sumU2(n) {
function sumCurried (line 47) | function sumCurried(n) {
function sumLblCurried (line 54) | function sumLblCurried(s, n) {
FILE: analysis/reanalyze/examples/deadcode/src/Unison.bs.js
function group (line 4) | function group(breakOpt, doc) {
function fits (line 12) | function fits(_w, _stack) {
function toString (line 28) | function toString(width, stack) {
FILE: analysis/reanalyze/examples/deadcode/src/UseImportJsValue.bs.js
function useGetProp (line 4) | function useGetProp(x) {
function useTypeImportedInOtherModule (line 8) | function useTypeImportedInOtherModule(x) {
FILE: analysis/reanalyze/examples/deadcode/src/Variants.bs.js
function isWeekend (line 4) | function isWeekend(x) {
function onlySunday (line 12) | function onlySunday(param) {
function swap (line 16) | function swap(x) {
function testConvert (line 24) | function testConvert(x) {
function testConvert2 (line 28) | function testConvert2(x) {
function testConvert3 (line 32) | function testConvert3(x) {
function testConvert2to3 (line 36) | function testConvert2to3(x) {
function id1 (line 40) | function id1(x) {
function id2 (line 44) | function id2(x) {
function polyWithOpt (line 48) | function polyWithOpt(foo) {
function restResult1 (line 64) | function restResult1(x) {
function restResult2 (line 68) | function restResult2(x) {
function restResult3 (line 72) | function restResult3(x) {
FILE: analysis/reanalyze/examples/deadcode/src/VariantsWithPayload.bs.js
function testWithPayload (line 4) | function testWithPayload(x) {
function printVariantWithPayload (line 8) | function printVariantWithPayload(x) {
function testManyPayloads (line 27) | function testManyPayloads(x) {
function printManyPayloads (line 31) | function printManyPayloads(x) {
function testSimpleVariant (line 46) | function testSimpleVariant(x) {
function testVariantWithPayloads (line 50) | function testVariantWithPayloads(x) {
function printVariantWithPayloads (line 54) | function printVariantWithPayloads(x) {
function testVariant1Int (line 77) | function testVariant1Int(x) {
function testVariant1Object (line 81) | function testVariant1Object(x) {
FILE: analysis/reanalyze/examples/deadcode/src/exception/Arr.bs.js
function ff (line 5) | function ff(a) {
FILE: analysis/reanalyze/examples/deadcode/src/exception/Exn.bs.js
function raises (line 5) | function raises(param) {
function raisesWithAnnotaion (line 52) | function raisesWithAnnotaion(param) {
FILE: analysis/reanalyze/examples/deadcode/src/exception/ExnA.bs.js
function bar (line 5) | function bar(param) {
FILE: analysis/reanalyze/examples/deadcode/src/exception/ExnB.bs.js
function foo (line 4) | function foo(param) {
FILE: analysis/reanalyze/examples/deadcode/src/exception/ExportWithRename.bs.js
function ExportWithRename (line 4) | function ExportWithRename(Props) {
FILE: analysis/reanalyze/examples/deadcode/src/exception/TestInnerModules.bs.js
function testM1 (line 8) | function testM1(x) {
function testM2 (line 12) | function testM2(x) {
FILE: analysis/reanalyze/examples/deadcode/src/exception/TestYojson.bs.js
function foo (line 8) | function foo(x) {
function bar (line 12) | function bar(str, json) {
function toString (line 31) | function toString(x) {
function toInt (line 35) | function toInt(x) {
FILE: analysis/reanalyze/examples/deadcode/src/exception/Yojson.bs.js
function from_string (line 7) | function from_string(param) {
function member (line 17) | function member(_s, j) {
function to_int (line 26) | function to_int(param) {
function to_string (line 30) | function to_string(param) {
FILE: analysis/reanalyze/examples/deadcode/src/exportNestedValues.js
class InnerClass (line 3) | class InnerClass {
class TopLevelClass (line 9) | class TopLevelClass {
FILE: analysis/reanalyze/examples/deadcode/src/trace.bs.js
function infok (line 6) | function infok(_mod_name, _fun_name, k) {
FILE: analysis/reanalyze/examples/termination/src/TestCyberTruck.bs.js
function progress (line 14) | function progress(param) {
function justReturn (line 37) | function justReturn(param) {
function alwaysLoop (line 41) | function alwaysLoop(_param) {
function alwaysProgress (line 48) | function alwaysProgress(_param) {
function alwaysProgressWrongOrder (line 56) | function alwaysProgressWrongOrder(param) {
function doNotAlias (line 61) | function doNotAlias(_param) {
function progressOnBothBranches (line 68) | function progressOnBothBranches(x) {
function progressOnOneBranch (line 75) | function progressOnOneBranch(x) {
function testParametricFunction (line 84) | function testParametricFunction(x) {
function callParseFunction (line 95) | function callParseFunction(x, parseFunction) {
function testCacheHit (line 99) | function testCacheHit(x) {
function doNothing (line 108) | function doNothing(param) {
function evalOrderIsNotLeftToRight (line 112) | function evalOrderIsNotLeftToRight(x) {
function evalOrderIsNotRightToLeft (line 117) | function evalOrderIsNotRightToLeft(x) {
function butFirstArgumentIsAlwaysEvaluated (line 122) | function butFirstArgumentIsAlwaysEvaluated(x) {
function butSecondArgumentIsAlwaysEvaluated (line 129) | function butSecondArgumentIsAlwaysEvaluated(x) {
function tokenToString (line 136) | function tokenToString(token) {
function next (line 155) | function next(p) {
function err (line 165) | function err(p, s) {
function expect (line 172) | function expect(p, token) {
function parseList (line 189) | function parseList(p, f) {
function $$parseInt (line 204) | function $$parseInt(p) {
function parseExpression (line 211) | function parseExpression(xOpt, p) {
function parseListInt (line 231) | function parseListInt(p) {
function parseListListInt (line 235) | function parseListListInt(p) {
function parseListExpression (line 239) | function parseListExpression(p) {
function parseListExpression2 (line 245) | function parseListExpression2(p) {
function parseListIntTailRecursive (line 252) | function parseListIntTailRecursive(p) {
function loopAfterProgress (line 267) | function loopAfterProgress(_param) {
function testLoopAfterProgress (line 274) | function testLoopAfterProgress(param) {
function nothing (line 279) | function nothing(param) {
function div (line 283) | function div(text, onClick) {
function initState (line 295) | function initState(n) {
function increment (line 302) | function increment(n) {
function incrementOnClick (line 306) | function incrementOnClick(setState, param) {
function counter$1 (line 310) | function counter$1(state, setState) {
function counterCompiled (line 317) | function counterCompiled(state) {
function onClick1 (line 325) | function onClick1(state) {
function countRenders (line 329) | function countRenders(state, setState) {
function countRendersCompiled (line 334) | function countRendersCompiled(state) {
function parseListO (line 353) | function parseListO(p, f) {
function parseIntO (line 373) | function parseIntO(p) {
function alwaysReturnNone (line 384) | function alwaysReturnNone(p) {
function parseListIntO (line 395) | function parseListIntO(p) {
function thisMakesNoProgress (line 403) | function thisMakesNoProgress(p, y) {
function f (line 422) | function f(p) {
function gParam (line 436) | function gParam(p, g) {
function g (line 445) | function g(p) {
function f$1 (line 456) | function f$1(p) {
function g$1 (line 464) | function g$1(p) {
function kleene0 (line 472) | function kleene0(f, p) {
function union (line 479) | function union(f, g, p) {
function concat (line 488) | function concat(f, g, p) {
function kleene (line 500) | function kleene(f, p) {
function two (line 512) | function two(p) {
function one (line 522) | function one(p) {
function oneTwo (line 532) | function oneTwo(p) {
function oneTwoStar (line 536) | function oneTwoStar(p) {
function testTry (line 553) | function testTry(_param) {
FILE: analysis/vendor/ext/ext_basic_hash_stubs.c
type uint32 (line 10) | typedef uint32_t uint32;
function CAMLprim (line 29) | CAMLprim value caml_bs_hash_string (value obj){
function CAMLprim (line 37) | CAMLprim value caml_bs_hash_int ( value d){
function CAMLprim (line 44) | CAMLprim value caml_bs_hash_string_and_int (value obj, value d){
function CAMLprim (line 52) | CAMLprim value caml_bs_hash_string_and_small_int(value obj, value d){
function CAMLprim (line 60) | CAMLprim value caml_bs_hash_small_int(value d){
function CAMLprim (line 69) | CAMLprim value caml_int_array_blit(
function CAMLprim (line 90) | CAMLprim value caml_bs_hash_stamp_and_name(value d, value obj ){
function CAMLprim (line 110) | CAMLprim value caml_string_length_based_compare(value s1, value s2)
function CAMLprim (line 148) | CAMLprim value caml_stale_file(value path)
function CAMLprim (line 161) | CAMLprim value caml_stale_file(value path)
function CAMLprim (line 183) | CAMLprim value caml_sys_is_directory_no_exn(value name)
FILE: client/src/commands/code_analysis.ts
constant REANALYZE_SOCKET_FILENAME (line 27) | const REANALYZE_SOCKET_FILENAME = ".rescript-reanalyze.sock";
constant REANALYZE_SERVER_MIN_VERSION (line 28) | const REANALYZE_SERVER_MIN_VERSION = "12.1.0";
type ReanalyzeServerState (line 31) | interface ReanalyzeServerState {
type DiagnosticsResultCodeActionsMap (line 290) | type DiagnosticsResultCodeActionsMap = Map<
type DiagnosticsResultFormat (line 295) | type DiagnosticsResultFormat = Array<{
type ClassifiedMessage (line 309) | enum ClassifiedMessage {
FILE: client/src/commands/dump_debug.ts
function runDebugDump (line 42) | function runDebugDump({
function runBsc (line 83) | function runBsc({
FILE: client/src/commands/paste_as_rescript_json.ts
constant INDENT_SIZE (line 3) | const INDENT_SIZE = 2;
constant INDENT_UNIT (line 4) | const INDENT_UNIT = " ".repeat(INDENT_SIZE);
type JsonConversionResult (line 77) | type JsonConversionResult =
FILE: client/src/commands/paste_as_rescript_jsx.ts
type JsxConversionResult (line 6) | type JsxConversionResult =
FILE: client/src/commands/transform-jsx.ts
type Rule (line 10) | type Rule<T extends Node = Node> = {
function applyRules (line 158) | function applyRules(
function transformJsx (line 174) | function transformJsx(input: string): string {
FILE: client/src/extension.ts
function activate (line 87) | function activate(context: ExtensionContext) {
function deactivate (line 561) | function deactivate(): Thenable<void> | undefined {
FILE: client/src/test/suite/helpers.ts
function getWorkspaceRoot (line 12) | function getWorkspaceRoot(): string {
function removeRescriptLockFile (line 23) | function removeRescriptLockFile(workspaceRoot: string): void {
function removeReanalyzeSocketFile (line 46) | function removeReanalyzeSocketFile(workspaceRoot: string): void {
function removeBsbLockFile (line 61) | function removeBsbLockFile(workspaceRoot: string): void {
function removeMonorepoLockFiles (line 76) | function removeMonorepoLockFiles(monorepoRoot: string): void {
function ensureExtensionActivated (line 99) | async function ensureExtensionActivated(): Promise<
function openFile (line 114) | async function openFile(filePath: string): Promise<vscode.TextDocument> {
function findLspLogContent (line 123) | function findLspLogContent(): string | null {
function waitFor (line 171) | async function waitFor(
function sleep (line 190) | function sleep(ms: number): Promise<void> {
function getCompilerLogPath (line 197) | function getCompilerLogPath(workspaceRoot: string): string {
function getFileMtime (line 204) | function getFileMtime(filePath: string): Date | null {
function waitForFileUpdate (line 215) | async function waitForFileUpdate(
function insertCommentAndSave (line 236) | async function insertCommentAndSave(
function restoreContentAndSave (line 249) | async function restoreContentAndSave(
function startBuildWatcher (line 267) | async function startBuildWatcher(waitMs: number = 1000): Promise<void> {
function startCodeAnalysis (line 275) | async function startCodeAnalysis(waitMs: number = 1000): Promise<void> {
function stopCodeAnalysis (line 283) | async function stopCodeAnalysis(): Promise<void> {
function showReanalyzeServerLog (line 290) | async function showReanalyzeServerLog(): Promise<void> {
type BuildPromptResult (line 305) | interface BuildPromptResult {
function findBuildPromptInLogs (line 313) | function findBuildPromptInLogs(): BuildPromptResult {
FILE: client/src/utils.ts
type NormalizedPath (line 25) | type NormalizedPath = string & { __brand: "NormalizedPath" };
function normalizePath (line 33) | function normalizePath(filePath: string | null): NormalizedPath | null {
type binaryName (line 38) | type binaryName = "rescript-editor-analysis.exe" | "rescript-tools.exe";
FILE: scripts/verify-package.mjs
constant ROOT_DIR (line 15) | const ROOT_DIR = path.join(__dirname, "..");
FILE: server/src/bsc-args/bsb.ts
type BsbCompilerArgs (line 6) | type BsbCompilerArgs = string[];
function getBsbBscArgs (line 8) | async function getBsbBscArgs(
FILE: server/src/bsc-args/rewatch.ts
type RewatchCompilerArgs (line 11) | type RewatchCompilerArgs = {
function getRuntimePath (line 16) | async function getRuntimePath(
function getRewatchBscArgs (line 22) | async function getRewatchBscArgs(
FILE: server/src/buildSchema.ts
type BuildSchema (line 4) | interface BuildSchema {
type ModuleFormat (line 14) | enum ModuleFormat {
type ModuleFormatObject (line 21) | interface ModuleFormatObject {
type SuffixSpec (line 27) | enum SuffixSpec {
FILE: server/src/codeActions.ts
type fileCodeActions (line 7) | type fileCodeActions = { range: p.Range; codeAction: p.CodeAction };
type filesCodeActions (line 9) | type filesCodeActions = {
type findCodeActionsConfig (line 13) | interface findCodeActionsConfig {
type codeActionExtractorConfig (line 188) | interface codeActionExtractorConfig {
type codeActionExtractor (line 198) | type codeActionExtractor = (
FILE: server/src/config.ts
type send (line 3) | type send = (msg: Message) => void;
type extensionConfiguration (line 5) | interface extensionConfiguration {
FILE: server/src/errorReporter.ts
type cb (line 1) | type cb = (msg: string) => void;
FILE: server/src/find-runtime.ts
function findNodeModulesDirs (line 7) | async function findNodeModulesDirs(
function findRescriptRuntimeInAlternativeLayout (line 57) | async function findRescriptRuntimeInAlternativeLayout(
function findRuntimePath (line 96) | async function findRuntimePath(
function findRescriptRuntimesInProject (line 166) | async function findRescriptRuntimesInProject(
FILE: server/src/incrementalCompilation.ts
constant INCREMENTAL_FOLDER_NAME (line 21) | const INCREMENTAL_FOLDER_NAME = "___incremental";
constant INCREMENTAL_FILE_FOLDER_LOCATION (line 22) | const INCREMENTAL_FILE_FOLDER_LOCATION = path.join(
type IncrementallyCompiledFileInfo (line 27) | type IncrementallyCompiledFileInfo = {
function cancelActiveCompilation (line 95) | function cancelActiveCompilation(entry: IncrementallyCompiledFileInfo): ...
function incrementalCompilationFileChanged (line 104) | function incrementalCompilationFileChanged(changedPath: NormalizedPath) {
function removeIncrementalFileFolder (line 124) | function removeIncrementalFileFolder(
function recreateIncrementalFileFolder (line 137) | function recreateIncrementalFileFolder(projectRootPath: NormalizedPath) {
function cleanUpIncrementalFiles (line 148) | function cleanUpIncrementalFiles(
function getBscArgs (line 185) | async function getBscArgs(
function argCouples (line 199) | function argCouples(argList: string[]): string[][] {
function argsFromCommandString (line 232) | function argsFromCommandString(cmdString: string): Array<Array<string>> {
function removeAnsiCodes (line 242) | function removeAnsiCodes(s: string): string {
function triggerIncrementalCompilationOfFile (line 246) | function triggerIncrementalCompilationOfFile(
function verifyTriggerToken (line 379) | function verifyTriggerToken(
function figureOutBscArgs (line 391) | async function figureOutBscArgs(
function remapCodeActionsToSourceFile (line 498) | function remapCodeActionsToSourceFile(
function filterIncrementalDiagnostics (line 523) | function filterIncrementalDiagnostics(
function logIncrementalCompilationError (line 560) | function logIncrementalCompilationError(
function processAndPublishDiagnostics (line 598) | function processAndPublishDiagnostics(
function compileContents (line 657) | async function compileContents(
function handleUpdateOpenedFile (line 785) | function handleUpdateOpenedFile(
function handleClosedFile (line 800) | function handleClosedFile(filePath: NormalizedPath) {
function getCodeActionsFromIncrementalCompilation (line 809) | function getCodeActionsFromIncrementalCompilation(
FILE: server/src/logger.ts
type LogLevel (line 4) | type LogLevel = "error" | "warn" | "info" | "log";
type Logger (line 13) | interface Logger {
class NoOpLogger (line 20) | class NoOpLogger implements Logger {
method error (line 21) | error(_message: string): void {}
method warn (line 22) | warn(_message: string): void {}
method info (line 23) | info(_message: string): void {}
method log (line 24) | log(_message: string): void {}
class LSPLogger (line 27) | class LSPLogger implements Logger {
method constructor (line 30) | constructor(private send: (msg: p.Message) => void) {}
method setLogLevel (line 32) | setLogLevel(level: LogLevel): void {
method shouldLog (line 36) | private shouldLog(level: LogLevel): boolean {
method error (line 40) | error(message: string): void {
method warn (line 46) | warn(message: string): void {
method info (line 52) | info(message: string): void {
method log (line 58) | log(message: string): void {
method sendLogMessage (line 64) | private sendLogMessage(message: string, type: p.MessageType): void {
function initializeLogger (line 77) | function initializeLogger(send: (msg: p.Message) => void): void {
function setLogLevel (line 81) | function setLogLevel(level: LogLevel): void {
function getLogger (line 87) | function getLogger(): Logger {
FILE: server/src/projectFiles.ts
type filesDiagnostics (line 5) | type filesDiagnostics = {
type projectFiles (line 9) | interface projectFiles {
FILE: server/src/server.ts
function applyUserConfiguration (line 34) | function applyUserConfiguration(configuration: extensionConfiguration) {
type extensionClientCapabilities (line 61) | interface extensionClientCapabilities {
type ProjectCompilationState (line 86) | type ProjectCompilationState = {
type CompilationStatusPayload (line 99) | type CompilationStatusPayload = {
function onWorkspaceDidChangeWatchedFiles (line 379) | async function onWorkspaceDidChangeWatchedFiles(
type clientSentBuildAction (line 417) | type clientSentBuildAction = {
function listen (line 600) | function listen(useStdio = false) {
function hover (line 620) | async function hover(msg: p.RequestMessage) {
function inlayHint (line 644) | async function inlayHint(msg: p.RequestMessage) {
function sendInlayHintsRefresh (line 664) | function sendInlayHintsRefresh() {
function codeLens (line 673) | async function codeLens(msg: p.RequestMessage) {
function sendCodeLensRefresh (line 687) | function sendCodeLensRefresh() {
function signatureHelp (line 696) | async function signatureHelp(msg: p.RequestMessage) {
function definition (line 722) | async function definition(msg: p.RequestMessage) {
function typeDefinition (line 736) | async function typeDefinition(msg: p.RequestMessage) {
function references (line 755) | async function references(msg: p.RequestMessage) {
function prepareRename (line 772) | async function prepareRename(
function rename (line 842) | async function rename(msg: p.RequestMessage) {
function documentSymbol (line 868) | async function documentSymbol(msg: p.RequestMessage) {
function askForAllCurrentConfiguration (line 888) | function askForAllCurrentConfiguration() {
function semanticTokens (line 906) | async function semanticTokens(msg: p.RequestMessage) {
function completion (line 926) | async function completion(msg: p.RequestMessage) {
function completionResolve (line 950) | async function completionResolve(msg: p.RequestMessage) {
function codeAction (line 975) | async function codeAction(msg: p.RequestMessage): Promise<p.ResponseMess...
function format (line 1030) | function format(msg: p.RequestMessage): Array<p.Message> {
function createInterface (line 1153) | async function createInterface(msg: p.RequestMessage): Promise<p.Message> {
function startBuildWatcher (line 1271) | async function startBuildWatcher(
function handleStartBuildRequest (line 1329) | async function handleStartBuildRequest(
function openCompiledFile (line 1369) | function openCompiledFile(msg: p.RequestMessage): p.Message {
function getServerVersion (line 1425) | async function getServerVersion(): Promise<string | undefined> {
function dumpServerState (line 1443) | async function dumpServerState(
function onMessage (line 1502) | async function onMessage(msg: p.Message) {
FILE: server/src/utils.ts
type NormalizedPath (line 41) | type NormalizedPath = string & { __brand: "NormalizedPath" };
type FileURI (line 49) | type FileURI = string & { __brand: "FileURI" };
function normalizePath (line 60) | function normalizePath(filePath: string | null): NormalizedPath | null {
function uriToNormalizedPath (line 76) | function uriToNormalizedPath(uri: FileURI): NormalizedPath {
function findProjectRootOfFileInDir (line 92) | function findProjectRootOfFileInDir(
function findProjectRootContainingFile (line 102) | function findProjectRootContainingFile(
function findProjectRootMatchingDir (line 127) | function findProjectRootMatchingDir(
function findProjectRootOfFile (line 152) | function findProjectRootOfFile(
function findProjectRootOfDir (line 171) | function findProjectRootOfDir(
type execResult (line 241) | type execResult<T = string> =
type formatCodeResult (line 251) | type formatCodeResult = execResult<string>;
function findReScriptVersionForProjectRoot (line 291) | async function findReScriptVersionForProjectRoot(
function computeWorkspaceRootPathFromLockfile (line 443) | function computeWorkspaceRootPathFromLockfile(
function getRuntimePathFromWorkspaceRoot (line 479) | async function getRuntimePathFromWorkspaceRoot(
function getRuntimePathFromProjectRoot (line 510) | async function getRuntimePathFromProjectRoot(
function getRuntimePathCacheSnapshot (line 546) | function getRuntimePathCacheSnapshot(): Record<string, string | null> {
type parsedCompilerLogResult (line 853) | type parsedCompilerLogResult = {
type parsedDiagnostic (line 862) | type parsedDiagnostic = {
FILE: shared/src/findBinary.ts
type BinaryName (line 7) | type BinaryName =
type FindBinaryOptions (line 15) | type FindBinaryOptions = {
FILE: tools/npm/getBinaryPath.js
function getBinaryPath (line 3) | function getBinaryPath() {
Copy disabled (too large)
Download .json
Condensed preview — 1282 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (10,550K chars).
[
{
"path": ".github/workflows/bump-version.js",
"chars": 2151,
"preview": "const fs = require(\"fs\");\nconst os = require(\"os\");\nconst path = require(\"path\");\nconst semver = require(\"semver\");\n\ncon"
},
{
"path": ".github/workflows/ci.yml",
"chars": 11670,
"preview": "name: CI\n\non:\n push:\n branches: [master]\n tags: \"*.*.*\"\n pull_request:\n branches: [master]\n\nconcurrency:\n gr"
},
{
"path": ".gitignore",
"chars": 478,
"preview": ".DS_Store\nout\nnode_modules\nexamples/*/lib\n\nanalysis/tests/lib\nanalysis/tests/.bsb.lock\n\nanalysis/tests-generic-jsx-trans"
},
{
"path": ".ocamlformat",
"chars": 250,
"preview": "profile = default\nversion = 0.27.0\n\nfield-space = tight-decl\nbreak-cases = toplevel\nmodule-item-spacing = preserve\ncases"
},
{
"path": ".ocamlformat-ignore",
"chars": 528,
"preview": "analysis/vendor/js_parser/**\nanalysis/vendor/ml/cmt_format.ml\nanalysis/vendor/ml/parser.ml\nanalysis/vendor/ml/pprintast."
},
{
"path": ".prettierignore",
"chars": 98,
"preview": "# Ignore artifacts:\nserver/out\nanalysis/examples\nanalysis/reanalyze/examples\ntools/tests\n.history/"
},
{
"path": ".prettierrc",
"chars": 3,
"preview": "{}\n"
},
{
"path": ".vscode/extensions.json",
"chars": 311,
"preview": "{\n // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.\n // Extension ident"
},
{
"path": ".vscode/launch.json",
"chars": 1232,
"preview": "// A launch configuration that compiles the extension and then opens it inside a new window\n{\n \"version\": \"0.2.0\",\n \"c"
},
{
"path": ".vscode/settings.json",
"chars": 320,
"preview": "{\n \"editor.insertSpaces\": false,\n \"tslint.enable\": true,\n \"typescript.tsc.autoDetect\": \"off\",\n \"typescript.preferenc"
},
{
"path": ".vscode/tasks.json",
"chars": 541,
"preview": "{\n \"version\": \"2.0.0\",\n \"tasks\": [\n {\n \"type\": \"npm\",\n \"script\": \"compile\",\n \"group\": \"build\",\n "
},
{
"path": ".vscodeignore",
"chars": 307,
"preview": ".vscode/**\r\n**/*.ts\r\n**/*.map\r\n.gitignore\r\n**/tsconfig.json\r\ncontributing.md\r\n.github/**\r\nserver/node_modules/.bin\r\nnode"
},
{
"path": "AGENTS.md",
"chars": 4850,
"preview": "# AGENTS.md\n\nThis file provides guidance to AI coding assistants when working with code in this repository.\n\n## Project "
},
{
"path": "CHANGELOG.md",
"chars": 42383,
"preview": "# Changelog\n\n> **Tags:**\n>\n> - :boom: [Breaking Change]\n> - :eyeglasses: [Spec Compliance]\n> - :rocket: [New Feature]\n> "
},
{
"path": "CONTRIBUTING.md",
"chars": 13783,
"preview": "# Contributing\n\nThanks for your interest. Below is an informal spec of how the plugin's server communicates with the act"
},
{
"path": "LICENSE.txt",
"chars": 1022,
"preview": "Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentati"
},
{
"path": "Makefile",
"chars": 626,
"preview": "SHELL = /bin/bash\n\nbuild:\n\tdune build\n\tcp -f _build/install/default/bin/rescript-editor-analysis analysis/rescript-edito"
},
{
"path": "README.md",
"chars": 15968,
"preview": "<h1 align=\"center\">\n <a href=\"https://marketplace.visualstudio.com/items?itemName=chenglou92.rescript-vscode\">ReScript "
},
{
"path": "analysis/Makefile",
"chars": 865,
"preview": "SHELL = /bin/bash\n\nbuild-tests:\n\tmake -C tests build\n\nbuild-tests-generic-jsx-transform:\n\tmake -C tests-generic-jsx-tran"
},
{
"path": "analysis/README.md",
"chars": 791,
"preview": "# Analysis Library and Binary\n\nThis subfolder builds a private command line binary used by the plugin to power a few fun"
},
{
"path": "analysis/bin/dune",
"chars": 183,
"preview": "(env\n (static\n (flags\n (:standard -ccopt -static))))\n\n(executable\n (public_name rescript-editor-analysis)\n (package a"
},
{
"path": "analysis/bin/main.ml",
"chars": 7928,
"preview": "open Analysis\n\nlet help =\n {|\n**Private CLI For rescript-vscode usage only**\n\nAPI examples:\n ./rescript-editor-analysi"
},
{
"path": "analysis/dune",
"chars": 295,
"preview": "(dirs bin src reanalyze vendor)\n\n(env\n (dev\n (env-vars\n (CPPO_FLAGS -U=RELEASE)))\n (release\n (env-vars\n (CPPO_FLAG"
},
{
"path": "analysis/examples/example-project/.gitignore",
"chars": 11,
"preview": "lib\n.merlin"
},
{
"path": "analysis/examples/example-project/.vscode/settings.json",
"chars": 42,
"preview": "{\n \"rescript.settings.logLevel\": \"log\"\n}\n"
},
{
"path": "analysis/examples/example-project/package.json",
"chars": 248,
"preview": "{\n \"name\": \"tryit\",\n \"dependencies\": {\n \"@rescript/react\": \"^0.14.0\",\n \"rescript\": \"12.1.0\"\n },\n \"scripts\": {\n"
},
{
"path": "analysis/examples/example-project/rescript.json",
"chars": 325,
"preview": "{\n \"name\": \"tryit\",\n \"sources\": \"src\",\n \"compiler-flags\": [],\n \"warnings\": {\n \"number\": \"-32-26-27-33\"\n },\n \"de"
},
{
"path": "analysis/examples/example-project/src/Embeded.md",
"chars": 834,
"preview": "# Markdown Embedded Fenced Code Regression Test\n\n```re\nmodule Something = {\n open Other;\n\n let m = {name: \"Me\", age: 0"
},
{
"path": "analysis/examples/example-project/src/Hello.res",
"chars": 2461,
"preview": "let someLongName = 10\n\nlet otherLongName = \"string\"\n\nlet x = {\"a\": 3}\n\nlet r = Other.something\n\nlet l = More.inner + Mor"
},
{
"path": "analysis/examples/example-project/src/Hello.res.js",
"chars": 2151,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as More$MyNamespace from \"./More.res.js\";\nimport * as Other$My"
},
{
"path": "analysis/examples/example-project/src/Json.res",
"chars": 16817,
"preview": "@@ocaml.doc(\" # Json parser\n *\n * Works with bucklescript and bsb-native\n *\n * ## Basics\n *\n * ```\n * open Json.Infix; /"
},
{
"path": "analysis/examples/example-project/src/Json.res.js",
"chars": 19986,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Pervasives from \"@rescript/runtime/lib/es6/Pervasives.js\";\n"
},
{
"path": "analysis/examples/example-project/src/ModuleWithDocComment.res",
"chars": 308,
"preview": "@@ocaml.doc(\"This comment is for the **toplevel** module.\")\n\n@ocaml.doc(\"This comment is for the first **nested** module"
},
{
"path": "analysis/examples/example-project/src/ModuleWithDocComment.res.js",
"chars": 196,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nlet NestedAgain = {\n y: 123\n};\n\nlet Nested = {\n x: \"123\",\n NestedAg"
},
{
"path": "analysis/examples/example-project/src/More.res",
"chars": 147,
"preview": "@@ocaml.doc(\" Toplevel docs \")\n\n@ocaml.doc(\" Some contents \")\nlet contnets = \"here\"\n\nlet inner = 20\n\nlet n = 10\n\nlet par"
},
{
"path": "analysis/examples/example-project/src/More.res.js",
"chars": 188,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nlet contnets = \"here\";\n\nlet inner = 20;\n\nlet n = 10;\n\nlet party = 30;\n"
},
{
"path": "analysis/examples/example-project/src/More.resi",
"chars": 62,
"preview": "let contnets: string\nlet inner: int\nlet n: int\nlet party: int\n"
},
{
"path": "analysis/examples/example-project/src/Other.res",
"chars": 457,
"preview": "/* let later = 10; */\n\n/* Ok testing things */\n\nlet something = 10\n\ntype person = {name: string, age: int}\n\ntype animals"
},
{
"path": "analysis/examples/example-project/src/Other.res.js",
"chars": 412,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nlet z = {\n name: \"hi\",\n age: 20\n};\n\nfunction concat(first, second) {"
},
{
"path": "analysis/examples/example-project/src/TransformHelpers.res",
"chars": 398,
"preview": "let deserialize_Belt__HashMapInt__t = (transformer, t) => assert(false)\n\nlet deserialize_Belt_HashMapInt____t = (a, b) ="
},
{
"path": "analysis/examples/example-project/src/TransformHelpers.res.js",
"chars": 1222,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction deserialize_Belt__HashMapInt__t(transformer, t) {\n throw {\n "
},
{
"path": "analysis/examples/example-project/src/ZZ.res",
"chars": 2443,
"preview": "let a = 12\n\nlet b = [1, 2, 3, a]\n\nlet c = <div />\n\nlet s = React.string\n\nmodule M = {\n @react.component\n let make = (~"
},
{
"path": "analysis/examples/example-project/src/ZZ.res.js",
"chars": 2349,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Stdlib_List from \"@rescript/runtime/lib/es6/Stdlib_List.js\""
},
{
"path": "analysis/examples/example-project/src/syntax/sample-highlighting.res",
"chars": 1440,
"preview": "// Bindings\nlet numberBinding = 123\n\nlet someFunction = (param: int): int => {\n let innerBinding = param + 2\n innerBin"
},
{
"path": "analysis/examples/example-project/src/syntax/sample-highlighting.rs",
"chars": 608,
"preview": "// Bindings\nfn some_function(param: usize) -> usize {\n let innerBinding = param + 2;\n innerBinding\n}\n\n// Types\nstr"
},
{
"path": "analysis/examples/example-project/src/syntax/sample-highlighting.tsx",
"chars": 1572,
"preview": "// Bindings\nlet numberBinding = 123;\n\nconst SomeComp = {\n Nested: () => null,\n};\n\nlet someFunction = (param: number): n"
},
{
"path": "analysis/examples/larger-project/.gitignore",
"chars": 18,
"preview": "/node_modules\n/lib"
},
{
"path": "analysis/examples/larger-project/.merlin",
"chars": 995,
"preview": "####{BSB GENERATED: NO EDIT\nFLG -ppx '/home/pedro/Desktop/Projects/rescript-vscode/analysis/examples/larger-project/node"
},
{
"path": "analysis/examples/larger-project/.watchmanconfig",
"chars": 0,
"preview": ""
},
{
"path": "analysis/examples/larger-project/bsconfig.json",
"chars": 405,
"preview": "{\n \"reanalyze\": {\n \"analysis\": [\"dce\"],\n \"suppress\": [],\n \"unsuppress\": []\n },\n \"name\": \"sample-typescript-a"
},
{
"path": "analysis/examples/larger-project/package.json",
"chars": 395,
"preview": "{\n \"name\": \"large-project\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"scripts\": {\n \"start\": \"rescript build -w\",\n "
},
{
"path": "analysis/examples/larger-project/src/AutoAnnotate.js",
"chars": 156,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n/* This output is empty. Its source's type definitions, externals and/or"
},
{
"path": "analysis/examples/larger-project/src/AutoAnnotate.res",
"chars": 188,
"preview": "type variant = R(int)\n\n@genType\ntype record = {variant: variant}\n\ntype r2 = {r2: int}\n\ntype r3 = {r3: int}\n\ntype r4 = {r"
},
{
"path": "analysis/examples/larger-project/src/BootloaderResource.js",
"chars": 156,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n/* This output is empty. Its source's type definitions, externals and/or"
},
{
"path": "analysis/examples/larger-project/src/BootloaderResource.res",
"chars": 190,
"preview": "/* NOTE: This is a spooky interface that provides no type safety. It should be\n * improved. Use with caution. */\n@module"
},
{
"path": "analysis/examples/larger-project/src/BucklescriptAnnotations.js",
"chars": 155,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction bar(x) {\n var f = x.twoArgs;\n return f(3, \"a\");\n}\n\nexport {"
},
{
"path": "analysis/examples/larger-project/src/BucklescriptAnnotations.res",
"chars": 485,
"preview": "@genType\ntype someMutableFields = {\n @set\n \"mutable0\": string,\n \"immutable\": int,\n @set\n \"mutable1\": string,\n @set"
},
{
"path": "analysis/examples/larger-project/src/ComponentAsProp.js",
"chars": 532,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as React from \"react\";\nimport * as Caml_option from \"rescript/"
},
{
"path": "analysis/examples/larger-project/src/ComponentAsProp.res",
"chars": 383,
"preview": "@ocaml.doc(\n \" This is like declaring a normal ReasonReact component's `make` function, except the body is a the intero"
},
{
"path": "analysis/examples/larger-project/src/CreateErrorHandler1.js",
"chars": 451,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Curry from \"rescript/lib/es6/curry.js\";\nimport * as ErrorHa"
},
{
"path": "analysis/examples/larger-project/src/CreateErrorHandler1.res",
"chars": 152,
"preview": "module Error1 = {\n type t = string\n let notification = s => (s, s)\n}\n\nmodule MyErrorHandler = ErrorHandler.Make(Error1"
},
{
"path": "analysis/examples/larger-project/src/CreateErrorHandler2.js",
"chars": 367,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as ErrorHandler from \"./ErrorHandler.js\";\n\nfunction notificati"
},
{
"path": "analysis/examples/larger-project/src/CreateErrorHandler2.res",
"chars": 167,
"preview": "module Error2 = {\n type t = int\n let notification = n => (string_of_int(n), \"\")\n}\n\nmodule MyErrorHandler = ErrorHandle"
},
{
"path": "analysis/examples/larger-project/src/DeadCodeImplementation.js",
"chars": 113,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar M = {\n x: 42\n};\n\nexport {\n M ,\n \n}\n/* No side effect */\n"
},
{
"path": "analysis/examples/larger-project/src/DeadCodeImplementation.res",
"chars": 49,
"preview": "module M: DeadCodeInterface.T = {\n let x = 42\n}\n"
},
{
"path": "analysis/examples/larger-project/src/DeadCodeInterface.js",
"chars": 156,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n/* This output is empty. Its source's type definitions, externals and/or"
},
{
"path": "analysis/examples/larger-project/src/DeadCodeInterface.res",
"chars": 33,
"preview": "module type T = {\n let x: int\n}\n"
},
{
"path": "analysis/examples/larger-project/src/DeadExn.js",
"chars": 396,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Caml_exceptions from \"rescript/lib/es6/caml_exceptions.js\";"
},
{
"path": "analysis/examples/larger-project/src/DeadExn.res",
"chars": 151,
"preview": "exception Etoplevel\n\nmodule Inside = {\n exception Einside\n}\n\nexception DeadE\nlet eToplevel = Etoplevel\n\nlet eInside = I"
},
{
"path": "analysis/examples/larger-project/src/DeadExn.resi",
"chars": 29,
"preview": "// empty\nexception Etoplevel\n"
},
{
"path": "analysis/examples/larger-project/src/DeadRT.js",
"chars": 118,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nconsole.log(/* Kaboom */0);\n\nexport {\n \n}\n/* Not a pure module */\n"
},
{
"path": "analysis/examples/larger-project/src/DeadRT.res",
"chars": 195,
"preview": "type moduleAccessPath =\n | Root(string)\n | Kaboom\n\nlet rec emitModuleAccessPath = moduleAccessPath =>\n switch moduleA"
},
{
"path": "analysis/examples/larger-project/src/DeadRT.resi",
"chars": 52,
"preview": "type moduleAccessPath =\n | Root(string)\n | Kaboom\n"
},
{
"path": "analysis/examples/larger-project/src/DeadTest.js",
"chars": 156,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n/* This output is empty. Its source's type definitions, externals and/or"
},
{
"path": "analysis/examples/larger-project/src/DeadTest.res",
"chars": 0,
"preview": ""
},
{
"path": "analysis/examples/larger-project/src/DeadTestBlacklist.js",
"chars": 104,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar x = 34;\n\nexport {\n x ,\n \n}\n/* No side effect */\n"
},
{
"path": "analysis/examples/larger-project/src/DeadTestBlacklist.res",
"chars": 11,
"preview": "let x = 34\n"
},
{
"path": "analysis/examples/larger-project/src/DeadTestWithInterface.js",
"chars": 156,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n/* This output is empty. Its source's type definitions, externals and/or"
},
{
"path": "analysis/examples/larger-project/src/DeadTestWithInterface.res",
"chars": 55,
"preview": "module Ext_buffer: {\n let x: int\n} = {\n let x = 42\n}\n"
},
{
"path": "analysis/examples/larger-project/src/DeadTestWithInterface.resi",
"chars": 1,
"preview": "\n"
},
{
"path": "analysis/examples/larger-project/src/DeadTypeTest.js",
"chars": 110,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar a = /* A */0;\n\nexport {\n a ,\n \n}\n/* No side effect */\n"
},
{
"path": "analysis/examples/larger-project/src/DeadTypeTest.res",
"chars": 214,
"preview": "type t =\n | A\n | B\nlet a = A\n\ntype deadType =\n | OnlyInImplementation\n | OnlyInInterface\n | InBoth\n | InNeither\n\nl"
},
{
"path": "analysis/examples/larger-project/src/DeadTypeTest.resi",
"chars": 117,
"preview": "type t =\n | A\n | B\nlet a: t\n\ntype deadType =\n | OnlyInImplementation\n | OnlyInInterface\n | InBoth\n | InNeither\n"
},
{
"path": "analysis/examples/larger-project/src/DeadValueTest.js",
"chars": 155,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar valueAlive = 1;\n\nvar valueDead = 2;\n\nexport {\n valueAlive ,\n val"
},
{
"path": "analysis/examples/larger-project/src/DeadValueTest.res",
"chars": 351,
"preview": "let valueAlive = 1\nlet valueDead = 2\n\nlet valueOnlyInImplementation = 3\n\n@raises(Failure)\nlet rec subList = (b, e, l) =>"
},
{
"path": "analysis/examples/larger-project/src/DeadValueTest.resi",
"chars": 39,
"preview": "let valueAlive: int\nlet valueDead: int\n"
},
{
"path": "analysis/examples/larger-project/src/Docstrings.js",
"chars": 1428,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction signMessage(message, key) {\n return message + String(key);\n}"
},
{
"path": "analysis/examples/larger-project/src/Docstrings.res",
"chars": 1132,
"preview": "@ocaml.doc(\" hello \") @genType\nlet flat = 34\n\n@ocaml.doc(\"\n * Sign a message with a key.\n *\n * @param message - A mes"
},
{
"path": "analysis/examples/larger-project/src/DynamicallyLoadedComponent.js",
"chars": 200,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction DynamicallyLoadedComponent(Props) {\n return Props.s;\n}\n\nvar "
},
{
"path": "analysis/examples/larger-project/src/DynamicallyLoadedComponent.res",
"chars": 52,
"preview": "@react.component\nlet make = (~s) => React.string(s)\n"
},
{
"path": "analysis/examples/larger-project/src/EmptyArray.js",
"chars": 283,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as React from \"react\";\n\nfunction EmptyArray$Z(Props) {\n retur"
},
{
"path": "analysis/examples/larger-project/src/EmptyArray.res",
"chars": 123,
"preview": "// @@config({flags : [\"-dsource\"]});\n\nmodule Z = {\n @react.component\n let make = () => {\n <br />\n }\n}\n\nlet _ = <Z "
},
{
"path": "analysis/examples/larger-project/src/ErrorHandler.js",
"chars": 321,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Curry from \"rescript/lib/es6/curry.js\";\n\nfunction Make($$Er"
},
{
"path": "analysis/examples/larger-project/src/ErrorHandler.res",
"chars": 223,
"preview": "module type Error = {\n type t\n let notification: t => (string, string)\n}\n\nmodule Make = (Error: Error) => {\n let noti"
},
{
"path": "analysis/examples/larger-project/src/ErrorHandler.resi",
"chars": 164,
"preview": "module type Error = {\n type t\n let notification: t => (string, string)\n}\nmodule Make: (Error: Error) =>\n{\n let notify"
},
{
"path": "analysis/examples/larger-project/src/EverythingLiveHere.js",
"chars": 139,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar x = 1;\n\nvar y = 3;\n\nvar z = 4;\n\nexport {\n x ,\n y ,\n z ,\n \n}\n/*"
},
{
"path": "analysis/examples/larger-project/src/EverythingLiveHere.res",
"chars": 32,
"preview": "let x = 1\n\nlet y = 3\n\nlet z = 4\n"
},
{
"path": "analysis/examples/larger-project/src/FC.js",
"chars": 160,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction foo(impl) {\n return impl.make;\n}\n\nconsole.log(foo);\n\nexport "
},
{
"path": "analysis/examples/larger-project/src/FC.res",
"chars": 191,
"preview": "module type ReplacebleComponent = {\n @react.component\n let make: unit => React.element\n}\n\nlet foo = (~impl: module(Rep"
},
{
"path": "analysis/examples/larger-project/src/FirstClassModules.js",
"chars": 837,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar y = \"abc\";\n\nvar EmptyInnerModule = {};\n\nvar InnerModule2 = {\n k: "
},
{
"path": "analysis/examples/larger-project/src/FirstClassModules.res",
"chars": 1116,
"preview": "module type MT = {\n let x: int\n type t = int\n @module(\"foo\") external f: int => int = \"f\"\n module type MT2 = {\n t"
},
{
"path": "analysis/examples/larger-project/src/FirstClassModulesInterface.js",
"chars": 126,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar r = {\n x: 3,\n y: \"hello\"\n};\n\nexport {\n r ,\n \n}\n/* No side effe"
},
{
"path": "analysis/examples/larger-project/src/FirstClassModulesInterface.res",
"chars": 140,
"preview": "type record = {\n x: int,\n y: string,\n}\n\nlet r = {x: 3, y: \"hello\"}\n\nmodule type MT = {\n let x: int\n}\n\ntype firstClass"
},
{
"path": "analysis/examples/larger-project/src/FirstClassModulesInterface.resi",
"chars": 154,
"preview": "@genType\ntype record = {\n x: int,\n y: string,\n}\n\nlet r: record\n\n@genType\nmodule type MT = {\n let x: int\n}\n\n@genType\nt"
},
{
"path": "analysis/examples/larger-project/src/Hooks.js",
"chars": 5129,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Curry from \"rescript/lib/es6/curry.js\";\nimport * as React f"
},
{
"path": "analysis/examples/larger-project/src/Hooks.res",
"chars": 3152,
"preview": "type vehicle = {name: string}\n\n@react.component\nlet make = (~vehicle) => {\n let (count, setCount) = React.useState(() ="
},
{
"path": "analysis/examples/larger-project/src/IgnoreInterface.js",
"chars": 156,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n/* This output is empty. Its source's type definitions, externals and/or"
},
{
"path": "analysis/examples/larger-project/src/IgnoreInterface.res",
"chars": 22,
"preview": "@gentype\ntype t = int\n"
},
{
"path": "analysis/examples/larger-project/src/IgnoreInterface.resi",
"chars": 102,
"preview": "// Use the annotations, and definitions, from the .re file\n@@genType.ignoreInterface\n\n@genType\ntype t\n"
},
{
"path": "analysis/examples/larger-project/src/ImmutableArray.js",
"chars": 156,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n/* This output is empty. Its source's type definitions, externals and/or"
},
{
"path": "analysis/examples/larger-project/src/ImmutableArray.res",
"chars": 0,
"preview": ""
},
{
"path": "analysis/examples/larger-project/src/ImmutableArray.resi",
"chars": 0,
"preview": ""
},
{
"path": "analysis/examples/larger-project/src/ImportHookDefault.js",
"chars": 315,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport ImportHookDefaultGen from \"./ImportHookDefault.gen\";\nimport * as"
},
{
"path": "analysis/examples/larger-project/src/ImportHookDefault.res",
"chars": 435,
"preview": "type person = {\n name: string,\n age: int,\n}\n\n@genType.import((\"./hookExample\", \"default\")) @react.component\nexternal m"
},
{
"path": "analysis/examples/larger-project/src/ImportHooks.js",
"chars": 262,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as ImportHooksGen from \"./ImportHooks.gen\";\n\nvar make = Import"
},
{
"path": "analysis/examples/larger-project/src/ImportHooks.res",
"chars": 407,
"preview": "@genType\ntype person = {\n name: string,\n age: int,\n}\n\n@genType\ntype renderMe<'a> = React.component<{\n \"randomString\":"
},
{
"path": "analysis/examples/larger-project/src/ImportIndex.js",
"chars": 178,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport ImportIndexGen from \"./ImportIndex.gen\";\n\nvar make = ImportIndex"
},
{
"path": "analysis/examples/larger-project/src/ImportIndex.res",
"chars": 175,
"preview": "// TODO: rename metodd back once remmt bug is fixed\n@genType.import(\"./\") @react.component\nexternal make: (~method: @str"
},
{
"path": "analysis/examples/larger-project/src/ImportJsValue.js",
"chars": 1494,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport ImportJsValueGen from \"./ImportJsValue.gen\";\nimport * as ImportJ"
},
{
"path": "analysis/examples/larger-project/src/ImportJsValue.res",
"chars": 1906,
"preview": "@ocaml.doc(\"\n * Wrap JS values to be used from Reason\n \")\n@genType.import(\"./MyMath\")\nexternal /* This is the module t"
},
{
"path": "analysis/examples/larger-project/src/ImportMyBanner.js",
"chars": 396,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Caml_option from \"rescript/lib/es6/caml_option.js\";\nimport "
},
{
"path": "analysis/examples/larger-project/src/ImportMyBanner.res",
"chars": 373,
"preview": "@ocaml.doc(\"\n * Wrap component MyBanner to be used from Reason.\n \")\n@genType\ntype message = {text: string}\n\n@genType.i"
},
{
"path": "analysis/examples/larger-project/src/JSResource.js",
"chars": 156,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n/* This output is empty. Its source's type definitions, externals and/or"
},
{
"path": "analysis/examples/larger-project/src/JSResource.res",
"chars": 72,
"preview": "type t<'a>\n\n@module external jSResource: string => t<'a> = \"JSResource\"\n"
},
{
"path": "analysis/examples/larger-project/src/LetPrivate.js",
"chars": 104,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar y = 34;\n\nexport {\n y ,\n \n}\n/* No side effect */\n"
},
{
"path": "analysis/examples/larger-project/src/LetPrivate.res",
"chars": 57,
"preview": "%%private(\n @genType\n let x = 34\n)\n\n@genType\nlet y = x\n"
},
{
"path": "analysis/examples/larger-project/src/ModuleAliases.js",
"chars": 563,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar Inner = {};\n\nvar Outer = {\n Inner: Inner\n};\n\nvar InnerNested = {}"
},
{
"path": "analysis/examples/larger-project/src/ModuleAliases.res",
"chars": 557,
"preview": "module Outer = {\n module Inner = {\n type innerT = {inner: string}\n }\n}\n\nmodule Outer2 = {\n module OuterInnerAlias "
},
{
"path": "analysis/examples/larger-project/src/ModuleAliases2.js",
"chars": 228,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar Inner = {};\n\nvar Outer = {\n Inner: Inner\n};\n\nvar OuterAlias;\n\nvar"
},
{
"path": "analysis/examples/larger-project/src/ModuleAliases2.res",
"chars": 259,
"preview": "@genType\ntype record = {\n x: int,\n y: string,\n}\n\nmodule Outer = {\n @genType\n type outer = {outer: string}\n\n module "
},
{
"path": "analysis/examples/larger-project/src/ModuleExceptionBug.js",
"chars": 435,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Caml_exceptions from \"rescript/lib/es6/caml_exceptions.js\";"
},
{
"path": "analysis/examples/larger-project/src/ModuleExceptionBug.res",
"chars": 111,
"preview": "module Dep = {\n let customDouble = foo => foo * 2\n}\n\nexception MyOtherException\n\nlet ddjdj = 34\nJs.log(ddjdj)\n"
},
{
"path": "analysis/examples/larger-project/src/NestedModules.js",
"chars": 565,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction nested3Function(x) {\n return x;\n}\n\nvar Nested3 = {\n x: 0,\n "
},
{
"path": "analysis/examples/larger-project/src/NestedModules.res",
"chars": 766,
"preview": "@genType\nlet notNested = 1\n\nmodule Universe = {\n @genType\n let theAnswer = 42\n\n let notExported = 33\n\n @genType\n ty"
},
{
"path": "analysis/examples/larger-project/src/NestedModulesInSignature.js",
"chars": 135,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar Universe = {\n theAnswer: 42\n};\n\nexport {\n Universe ,\n \n}\n/* No "
},
{
"path": "analysis/examples/larger-project/src/NestedModulesInSignature.res",
"chars": 43,
"preview": "module Universe = {\n let theAnswer = 42\n}\n"
},
{
"path": "analysis/examples/larger-project/src/NestedModulesInSignature.resi",
"chars": 53,
"preview": "module Universe: {\n @genType\n let theAnswer: int\n}\n"
},
{
"path": "analysis/examples/larger-project/src/Newsyntax.js",
"chars": 123,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar x = 34;\n\nvar y = 11;\n\nexport {\n x ,\n y ,\n \n}\n/* No side effect "
},
{
"path": "analysis/examples/larger-project/src/Newsyntax.res",
"chars": 132,
"preview": "let x = 34\n\nlet y = 11\n\ntype record = {\n xxx: int,\n yyy: int,\n}\n\ntype variant = A | B(int) | C\n\ntype record2 = {xx: in"
},
{
"path": "analysis/examples/larger-project/src/Newton.js",
"chars": 1222,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Curry from \"rescript/lib/es6/curry.js\";\n\nfunction $neg(prim"
},
{
"path": "analysis/examples/larger-project/src/Newton.res",
"chars": 765,
"preview": "let \\\"-\" = \\\"-.\"\nlet \\\"+\" = \\\"+.\"\nlet \\\"*\" = \\\"*.\"\nlet \\\"/\" = \\\"/.\"\n\nlet newton = (~f, ~fPrimed, ~initial, ~threshold) ="
},
{
"path": "analysis/examples/larger-project/src/Opaque.js",
"chars": 251,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction noConversion(x) {\n return x;\n}\n\nfunction testConvertNestedRe"
},
{
"path": "analysis/examples/larger-project/src/Opaque.res",
"chars": 256,
"preview": "@genType.opaque\ntype opaqueFromRecords = A(Records.coord)\n\n@genType\nlet noConversion = (x: opaqueFromRecords) => x\n\n@gen"
},
{
"path": "analysis/examples/larger-project/src/OptArg.js",
"chars": 1321,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction foo(xOpt, yOpt, zOpt, w) {\n var x = xOpt !== undefined ? xOp"
},
{
"path": "analysis/examples/larger-project/src/OptArg.res",
"chars": 650,
"preview": "let foo = (~x=1, ~y=2, ~z=3, w) => x + y + z + w\n\nlet bar = (~x=?, ~y, ~z=?, w) => y + w\n\nJs.log(foo(~x=3, 4))\n\nJs.log(b"
},
{
"path": "analysis/examples/larger-project/src/OptArg.resi",
"chars": 106,
"preview": "let foo: (~x: int=?, ~y: int=?, ~z: int=?, int) => int\nlet bar: (~x: 'a=?, ~y: int, ~z: 'b=?, int) => int\n"
},
{
"path": "analysis/examples/larger-project/src/P.js",
"chars": 1849,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Caml_exceptions from \"rescript/lib/es6/caml_exceptions.js\";"
},
{
"path": "analysis/examples/larger-project/src/P.res",
"chars": 404,
"preview": "exception Sys_error(string)\nlet input = _ => assert false\nlet output = _ => assert false\nlet open_temp_file = _ => asser"
},
{
"path": "analysis/examples/larger-project/src/Records.js",
"chars": 4163,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Belt_List from \"rescript/lib/es6/belt_List.js\";\nimport * as"
},
{
"path": "analysis/examples/larger-project/src/Records.res",
"chars": 2713,
"preview": "open Belt\n\n@genType\ntype coord = {\n x: int,\n y: int,\n z: option<int>,\n}\n\n@genType\nlet origin = {x: 0, y: 0, z: Some(0"
},
{
"path": "analysis/examples/larger-project/src/References.js",
"chars": 688,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction create(x) {\n return {\n contents: x\n };\n}\n\nfu"
},
{
"path": "analysis/examples/larger-project/src/References.res",
"chars": 882,
"preview": "// Test pervasive references\n\n@genType\nlet create = (x: int) => ref(x)\n\n@genType\nlet access = r => r.contents + 1\n\n@genT"
},
{
"path": "analysis/examples/larger-project/src/RepeatedLabel.js",
"chars": 221,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction userData(param) {\n return {\n a: param.a,\n "
},
{
"path": "analysis/examples/larger-project/src/RepeatedLabel.res",
"chars": 165,
"preview": "type userData = {\n a: bool,\n b: int,\n}\n\ntype tabState = {\n a: bool,\n b: int,\n f: string,\n}\n\nlet userData = ({a, b})"
},
{
"path": "analysis/examples/larger-project/src/RequireCond.js",
"chars": 156,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n/* This output is empty. Its source's type definitions, externals and/or"
},
{
"path": "analysis/examples/larger-project/src/RequireCond.res",
"chars": 547,
"preview": "@module\n@deprecated(\n \"Please use this syntax to guarantee safe usage: [%requireCond(`gk, \\\"gk_name\\\", ConditionalModul"
},
{
"path": "analysis/examples/larger-project/src/Shadow.js",
"chars": 211,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction test(param) {\n return \"a\";\n}\n\nfunction test$1(param) {\n ret"
},
{
"path": "analysis/examples/larger-project/src/Shadow.res",
"chars": 131,
"preview": "@genType\nlet test = () => 3\n\n@genType\nlet test = () => \"a\"\n\nmodule M = {\n @genType\n let test = () => 3\n\n let test = ("
},
{
"path": "analysis/examples/larger-project/src/TestDeadExn.js",
"chars": 188,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as DeadExn from \"./DeadExn.js\";\n\nconsole.log({\n RE_EXN_ID"
},
{
"path": "analysis/examples/larger-project/src/TestDeadExn.res",
"chars": 26,
"preview": "Js.log(DeadExn.Etoplevel)\n"
},
{
"path": "analysis/examples/larger-project/src/TestEmitInnerModules.js",
"chars": 244,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar Inner = {\n x: 34,\n y: \"hello\"\n};\n\nvar Inner$1 = {\n y: 44\n};\n\nva"
},
{
"path": "analysis/examples/larger-project/src/TestEmitInnerModules.res",
"chars": 175,
"preview": "module Inner = {\n @genType\n let x = 34\n @genType\n let y = \"hello\"\n}\n\nmodule Outer = {\n module Medium = {\n module"
},
{
"path": "analysis/examples/larger-project/src/TestFirstClassModules.js",
"chars": 377,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction convert(x) {\n return x;\n}\n\nfunction convertInterface(x) {\n "
},
{
"path": "analysis/examples/larger-project/src/TestFirstClassModules.res",
"chars": 618,
"preview": "@genType\nlet convert = (x: FirstClassModules.firstClassModule) => x\n\n@genType\nlet convertInterface = (x: FirstClassModul"
},
{
"path": "analysis/examples/larger-project/src/TestImmutableArray.js",
"chars": 492,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Belt_Array from \"rescript/lib/es6/belt_Array.js\";\nimport * "
},
{
"path": "analysis/examples/larger-project/src/TestImmutableArray.res",
"chars": 284,
"preview": "@genType\nlet testImmutableArrayGet = arr => {\n open ImmutableArray\n arr[3]\n}\n\n/*\n type error\n let testImmutableArr"
},
{
"path": "analysis/examples/larger-project/src/TestImport.js",
"chars": 845,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Caml_option from \"rescript/lib/es6/caml_option.js\";\nimport "
},
{
"path": "analysis/examples/larger-project/src/TestImport.res",
"chars": 1031,
"preview": "@genType.import((\n \"./exportNestedValues\",\n \"TopLevelClass.MiddleLevelElements.stuff.InnerStuff.innerStuffContents\",\n)"
},
{
"path": "analysis/examples/larger-project/src/TestModuleAliases.js",
"chars": 519,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction testInner1(x) {\n return x;\n}\n\nfunction testInner1Expanded(x)"
},
{
"path": "analysis/examples/larger-project/src/TestModuleAliases.res",
"chars": 747,
"preview": "module OtherFile = ModuleAliases2\nmodule OtherFileAlias = OtherFile\n\n@genType\ntype record = OtherFile.record\n\n@genType\nt"
},
{
"path": "analysis/examples/larger-project/src/TestOptArg.js",
"chars": 957,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as OptArg from \"./OptArg.js\";\n\nconsole.log(OptArg.bar(undefine"
},
{
"path": "analysis/examples/larger-project/src/TestOptArg.res",
"chars": 322,
"preview": "Js.log(OptArg.bar(~z=3, ~y=3, 4))\n\nlet foo = (~x=3, y) => x + y\n\nlet bar = () => foo(~x=12, 3)\n\nJs.log(bar)\n\nlet notSupp"
},
{
"path": "analysis/examples/larger-project/src/TestPromise.js",
"chars": 290,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction convert(param) {\n return param.then(function (param) {\n "
},
{
"path": "analysis/examples/larger-project/src/TestPromise.res",
"chars": 228,
"preview": "@genType\ntype promise<'a> = Js.Promise.t<'a>\n\n@genType\ntype fromPayload = {\n x: int,\n s: string,\n}\n\n@genType\ntype toPa"
},
{
"path": "analysis/examples/larger-project/src/ToSuppress.js",
"chars": 121,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar toSuppress = 0;\n\nexport {\n toSuppress ,\n \n}\n/* No side effect */"
},
{
"path": "analysis/examples/larger-project/src/ToSuppress.res",
"chars": 19,
"preview": "let toSuppress = 0\n"
},
{
"path": "analysis/examples/larger-project/src/TransitiveType1.js",
"chars": 193,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction convert(x) {\n return x;\n}\n\nfunction convertAlias(x) {\n retu"
},
{
"path": "analysis/examples/larger-project/src/TransitiveType1.res",
"chars": 115,
"preview": "@genType\nlet convert = (x: TransitiveType2.t2) => x\n\n@genType\nlet convertAlias = (x: TransitiveType2.t2Alias) => x\n"
},
{
"path": "analysis/examples/larger-project/src/TransitiveType2.js",
"chars": 138,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction convertT2(x) {\n return x;\n}\n\nexport {\n convertT2 ,\n \n}\n/* "
},
{
"path": "analysis/examples/larger-project/src/TransitiveType2.res",
"chars": 104,
"preview": "@genType\ntype t2 = option<TransitiveType3.t3>\n\n@genType\ntype t2Alias = t2\n\nlet convertT2 = (x: t2) => x\n"
},
{
"path": "analysis/examples/larger-project/src/TransitiveType3.js",
"chars": 138,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction convertT3(x) {\n return x;\n}\n\nexport {\n convertT3 ,\n \n}\n/* "
},
{
"path": "analysis/examples/larger-project/src/TransitiveType3.res",
"chars": 85,
"preview": "@genType\ntype t3 = {\n i: int,\n s: string,\n}\n\n@genType\nlet convertT3 = (x: t3) => x\n"
},
{
"path": "analysis/examples/larger-project/src/Tuples.js",
"chars": 1320,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Belt_Option from \"rescript/lib/es6/belt_Option.js\";\n\nfuncti"
},
{
"path": "analysis/examples/larger-project/src/Tuples.res",
"chars": 869,
"preview": "open Belt\n\n@genType\nlet testTuple = ((a, b)) => a + b\n\n@genType\ntype coord = (int, int, option<int>)\n\n@genType\nlet origi"
},
{
"path": "analysis/examples/larger-project/src/TypeParams1.js",
"chars": 132,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar exportSomething = 10;\n\nexport {\n exportSomething ,\n \n}\n/* No sid"
},
{
"path": "analysis/examples/larger-project/src/TypeParams1.res",
"chars": 68,
"preview": "@gentype\ntype ocaml_array<'a> = array<'a>\n\nlet exportSomething = 10\n"
},
{
"path": "analysis/examples/larger-project/src/TypeParams2.js",
"chars": 132,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nvar exportSomething = 10;\n\nexport {\n exportSomething ,\n \n}\n/* No sid"
},
{
"path": "analysis/examples/larger-project/src/TypeParams2.res",
"chars": 146,
"preview": "@genType\ntype item = {id: int}\n\n@genType\ntype items = TypeParams1.ocaml_array<item>\n\n@genType\ntype items2 = array<item>\n"
},
{
"path": "analysis/examples/larger-project/src/TypeParams3.js",
"chars": 173,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction test(x) {\n return x;\n}\n\nfunction test2(x) {\n return x;\n}\n\ne"
},
{
"path": "analysis/examples/larger-project/src/TypeParams3.res",
"chars": 99,
"preview": "@genType\nlet test = (x: TypeParams2.items) => x\n\n@genType\nlet test2 = (x: TypeParams2.items2) => x\n"
},
{
"path": "analysis/examples/larger-project/src/Types.js",
"chars": 1723,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as List from \"rescript/lib/es6/list.js\";\nimport * as Curry fro"
},
{
"path": "analysis/examples/larger-project/src/Types.res",
"chars": 3089,
"preview": "@genType\ntype t = int\n\n@genType\nlet someIntList = list{1, 2, 3}\n\n@genType\nlet map = List.map\n\n@genType\ntype typeWithVars"
},
{
"path": "analysis/examples/larger-project/src/Unboxed.js",
"chars": 179,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction testV1(x) {\n return x;\n}\n\nfunction r2Test(x) {\n return x;\n}"
},
{
"path": "analysis/examples/larger-project/src/Unboxed.res",
"chars": 237,
"preview": "@genType @ocaml.unboxed\ntype v1 = A(int)\n\n@genType @unboxed\ntype v2 = A(int)\n\n@genType\nlet testV1 = (x: v1) => x\n\n@genTy"
},
{
"path": "analysis/examples/larger-project/src/Uncurried.js",
"chars": 1328,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Curry from \"rescript/lib/es6/curry.js\";\n\nfunction uncurried"
},
{
"path": "analysis/examples/larger-project/src/Uncurried.res",
"chars": 1189,
"preview": "@genType\ntype u0 = (. unit) => string\n\n@genType\ntype u1 = (. int) => string\n\n@genType\ntype u2 = (. int, string) => strin"
},
{
"path": "analysis/examples/larger-project/src/Unison.js",
"chars": 1390,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction group(breakOpt, doc) {\n var $$break = breakOpt !== undefined"
},
{
"path": "analysis/examples/larger-project/src/Unison.res",
"chars": 936,
"preview": "// Exmple of several DCE checks operating in unison\n\ntype break =\n | IfNeed\n | Never\n | Always\n\ntype t = {\n break: b"
},
{
"path": "analysis/examples/larger-project/src/UseImportJsValue.js",
"chars": 249,
"preview": "// Generated by ReScript, PLEASE EDIT WITH CARE\n\n\nfunction useGetProp(x) {\n return x.getProp() + 1 | 0;\n}\n\nfunction use"
},
{
"path": "analysis/examples/larger-project/src/UseImportJsValue.res",
"chars": 191,
"preview": "@genType\nlet useGetProp = (x: ImportJsValue.AbsoluteValue.t) => x->ImportJsValue.AbsoluteValue.getProp + 1\n\n@genType\nlet"
}
]
// ... and 1082 more files (download for full content)
About this extraction
This page contains the full source code of the rescript-lang/rescript-vscode GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1282 files (9.4 MB), approximately 2.5M tokens, and a symbol index with 1530 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.