├── .ci ├── build-platform.yml ├── use-node.yml └── utils │ ├── publish-build-cache.yml │ ├── restore-build-cache.yml │ ├── use-esy.yml │ └── use-node.yml ├── .circleci ├── config.osx.yml ├── config.yml └── try-config.sh ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── actions │ ├── check.js │ ├── package-lock.json │ └── package.json └── workflows │ ├── main.yml │ └── release.yml ├── .gitignore ├── .npmignore ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── Changelog.md ├── LICENSE ├── Readme.md ├── appveyor.yml ├── azure-pipelines.yml ├── belt ├── belt.ml ├── belt_Array.ml ├── belt_HashMap.ml ├── belt_HashMapInt.ml ├── belt_HashMapString.ml ├── belt_HashSet.ml ├── belt_HashSetInt.ml ├── belt_HashSetString.ml ├── belt_Id.ml ├── belt_List.ml ├── belt_Map.ml ├── belt_MapDict.ml ├── belt_MapInt.ml ├── belt_MapString.ml ├── belt_MutableMap.ml ├── belt_MutableMapInt.ml ├── belt_MutableMapString.ml ├── belt_MutableQueue.ml ├── belt_MutableSet.ml ├── belt_MutableSetInt.ml ├── belt_MutableSetString.ml ├── belt_MutableStack.ml ├── belt_Option.ml ├── belt_Range.ml ├── belt_Result.ml ├── belt_Set.ml ├── belt_SetDict.ml ├── belt_SetInt.ml ├── belt_SetString.ml ├── belt_SortArray.ml ├── belt_SortArrayInt.ml ├── belt_SortArrayString.ml ├── belt_internalAVLset.ml ├── belt_internalAVLtree.ml ├── belt_internalBuckets.ml ├── belt_internalBucketsType.ml ├── belt_internalMapInt.ml ├── belt_internalMapString.ml ├── belt_internalSetBuckets.ml ├── belt_internalSetInt.ml ├── belt_internalSetString.ml ├── caml_hash.ml ├── convert.sh ├── dune ├── js.ml ├── js_math.ml ├── stubs.c └── test.ml ├── belt_ppx ├── Belt_ppx.ml └── dune ├── belt_src ├── belt.ml ├── belt_Array.ml ├── belt_HashMap.ml ├── belt_HashMapInt.ml ├── belt_HashMapString.ml ├── belt_HashSet.ml ├── belt_HashSetInt.ml ├── belt_HashSetString.ml ├── belt_Id.ml ├── belt_List.ml ├── belt_Map.ml ├── belt_MapDict.ml ├── belt_MapInt.ml ├── belt_MapString.ml ├── belt_MutableMap.ml ├── belt_MutableMapInt.ml ├── belt_MutableMapString.ml ├── belt_MutableQueue.ml ├── belt_MutableSet.ml ├── belt_MutableSetInt.ml ├── belt_MutableSetString.ml ├── belt_MutableStack.ml ├── belt_Option.ml ├── belt_Range.ml ├── belt_Result.ml ├── belt_Set.ml ├── belt_SetDict.ml ├── belt_SetInt.ml ├── belt_SetString.ml ├── belt_SortArray.ml ├── belt_SortArrayInt.ml ├── belt_SortArrayString.ml ├── belt_internalAVLset.ml ├── belt_internalAVLtree.ml ├── belt_internalBuckets.ml ├── belt_internalBucketsType.ml ├── belt_internalMapInt.ml ├── belt_internalMapString.ml ├── belt_internalSetBuckets.ml ├── belt_internalSetInt.ml ├── belt_internalSetString.ml ├── caml_hash.ml ├── js.ml ├── js_math.ml └── test.ml ├── bin ├── Bin.re └── dune ├── core ├── CodeLens.re ├── Query.re ├── References.re ├── SharedTypes.re └── dune ├── dune ├── dune-project ├── editor-extensions ├── coc.nvim │ ├── .eslintignore │ ├── .eslintrc.yml │ ├── .flowconfig │ ├── .gitignore │ ├── .npmignore │ ├── .prettierrc.yml │ ├── .vim │ │ └── coc-settings.json │ ├── README.md │ ├── babel.config.js │ ├── package.json │ ├── rls │ │ └── CURRENT │ ├── src │ │ └── index.js │ ├── webpack.config.js │ └── yarn.lock └── vscode │ ├── .vscodeignore │ ├── LICENSE │ ├── Readme.md │ ├── bin.native │ ├── bin.native.exe │ ├── bin.native.linux │ ├── linux.zip │ ├── logo.png │ ├── logo.sketch │ ├── macos.zip │ ├── ocaml.configuration.json │ ├── ocaml.json │ ├── package-lock.json │ ├── package.json │ ├── reason-lisp.configuration.json │ ├── reason-lisp.json │ ├── reason-markdown-codeblock.json │ ├── reason.configuration.json │ ├── reason.json │ ├── screenshot.png │ ├── script │ └── syntax.js │ ├── snippets │ └── snippets.json │ ├── src │ ├── index.js │ └── syntaxes │ │ ├── basis.ts │ │ ├── ocaml.ts │ │ ├── schema.ts │ │ └── tsconfig.json │ └── windows.zip ├── esy.lock.json ├── esy.lock ├── .gitattributes ├── .gitignore ├── index.json ├── opam │ ├── ANSITerminal.0.8.1 │ │ └── opam │ ├── base-bytes.base │ │ └── opam │ ├── base-threads.base │ │ └── opam │ ├── base-unix.base │ │ └── opam │ ├── base.v0.13.1 │ │ └── opam │ ├── conf-m4.1 │ │ └── opam │ ├── cppo.1.6.6 │ │ └── opam │ ├── dune-configurator.2.3.1 │ │ └── opam │ ├── dune-private-libs.2.3.1 │ │ └── opam │ ├── dune.2.3.1 │ │ └── opam │ ├── junit.2.0.2 │ │ └── opam │ ├── menhir.20200211 │ │ └── opam │ ├── menhirLib.20200211 │ │ └── opam │ ├── menhirSdk.20200211 │ │ └── opam │ ├── merlin-extend.0.5 │ │ └── opam │ ├── ocaml-compiler-libs.v0.12.1 │ │ └── opam │ ├── ocaml-migrate-parsetree.1.6.0 │ │ └── opam │ ├── ocamlbuild.0.14.0 │ │ └── opam │ ├── ocamlfind.1.8.1 │ │ ├── files │ │ │ ├── ocaml-stub │ │ │ └── ocamlfind.install │ │ └── opam │ ├── ppx_derivers.1.2.1 │ │ └── opam │ ├── ppx_tools_versioned.5.2.3 │ │ └── opam │ ├── ppxlib.0.12.0 │ │ └── opam │ ├── ptime.0.8.5 │ │ └── opam │ ├── re.1.9.0 │ │ └── opam │ ├── reason.3.5.2 │ │ └── opam │ ├── result.1.5 │ │ └── opam │ ├── seq.base │ │ ├── files │ │ │ ├── META.seq │ │ │ └── seq.install │ │ └── opam │ ├── sexplib0.v0.13.0 │ │ └── opam │ ├── stdio.v0.13.0 │ │ └── opam │ ├── stdlib-shims.0.1.0 │ │ └── opam │ ├── stringext.1.6.0 │ │ └── opam │ ├── topkg.1.0.1 │ │ └── opam │ ├── tyxml.4.3.0 │ │ └── opam │ ├── uchar.0.0.2 │ │ └── opam │ ├── uri.3.1.0 │ │ └── opam │ └── uutf.1.0.2 │ │ └── opam └── overrides │ ├── opam__s__ocamlbuild_opam__c__0.14.0_opam_override │ ├── files │ │ └── ocamlbuild-0.14.0.patch │ └── package.json │ └── opam__s__ocamlfind_opam__c__1.8.1_opam_override │ ├── files │ └── findlib-1.8.1.patch │ └── package.json ├── examples ├── bs-3.1.5 │ ├── .vscode │ │ └── settings.json │ ├── bsconfig.json │ ├── package-lock.json │ ├── package.json │ └── src │ │ ├── Component1.bs.js │ │ ├── Component1.re │ │ ├── Component2.bs.js │ │ ├── Component2.re │ │ ├── Index.bs.js │ │ ├── Index.re │ │ └── index.html ├── bs-7.2 │ ├── .vscode │ │ └── settings.json │ ├── bsconfig.json │ ├── package-lock.json │ ├── package.json │ └── src │ │ ├── Component1.bs.js │ │ ├── Component1.re │ │ ├── Component2.bs.js │ │ ├── Component2.re │ │ ├── Index.bs.js │ │ ├── Index.re │ │ └── index.html ├── dune-4.07 │ ├── .vscode │ │ └── settings.json │ ├── both │ │ ├── A.re │ │ ├── B.re │ │ └── dune │ ├── dune-example.opam │ ├── dune-project │ ├── esy.json │ ├── esy.lock │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── index.json │ │ ├── opam │ │ │ ├── base-threads.base │ │ │ │ └── opam │ │ │ ├── base-unix.base │ │ │ │ └── opam │ │ │ ├── conf-m4.1 │ │ │ │ └── opam │ │ │ ├── cppo.1.6.6 │ │ │ │ └── opam │ │ │ ├── dune.1.11.4 │ │ │ │ └── opam │ │ │ ├── menhir.20190924 │ │ │ │ └── opam │ │ │ ├── merlin-extend.0.5 │ │ │ │ └── opam │ │ │ ├── ocaml-migrate-parsetree.1.5.0 │ │ │ │ └── opam │ │ │ ├── ocamlbuild.0.14.0 │ │ │ │ └── opam │ │ │ ├── ocamlfind.1.8.1 │ │ │ │ ├── files │ │ │ │ │ ├── ocaml-stub │ │ │ │ │ └── ocamlfind.install │ │ │ │ └── opam │ │ │ ├── ppx_derivers.1.2.1 │ │ │ │ └── opam │ │ │ ├── reason.3.5.2 │ │ │ │ └── opam │ │ │ └── result.1.4 │ │ │ │ └── opam │ │ └── overrides │ │ │ ├── opam__s__ocamlbuild_opam__c__0.14.0_opam_override │ │ │ ├── files │ │ │ │ └── ocamlbuild-0.14.0.patch │ │ │ └── package.json │ │ │ └── opam__s__ocamlfind_opam__c__1.8.1_opam_override │ │ │ ├── files │ │ │ └── findlib-1.8.1.patch │ │ │ └── package.json │ └── src │ │ ├── One.re │ │ ├── Three.re │ │ ├── Two.re │ │ └── dune ├── dune-complex │ ├── awesome │ │ └── dune │ ├── both │ │ ├── A.re │ │ ├── B.re │ │ └── dune │ ├── dune-complex.opam │ ├── dune-project │ ├── esy.json │ ├── esy.lock │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── index.json │ │ ├── opam │ │ │ ├── base-threads.base │ │ │ │ └── opam │ │ │ ├── base-unix.base │ │ │ │ └── opam │ │ │ ├── conf-m4.1 │ │ │ │ └── opam │ │ │ ├── cppo.1.6.5 │ │ │ │ └── opam │ │ │ ├── dune.1.8.2 │ │ │ │ └── opam │ │ │ ├── jbuilder.transition │ │ │ │ └── opam │ │ │ ├── menhir.20181113 │ │ │ │ └── opam │ │ │ ├── merlin-extend.0.3 │ │ │ │ └── opam │ │ │ ├── ocaml-migrate-parsetree.1.2.0 │ │ │ │ └── opam │ │ │ ├── ocamlbuild.0.14.0 │ │ │ │ └── opam │ │ │ ├── ocamlfind.1.8.0 │ │ │ │ ├── files │ │ │ │ │ ├── no-awk-check.patch │ │ │ │ │ ├── ocaml-stub │ │ │ │ │ └── ocamlfind.install │ │ │ │ └── opam │ │ │ ├── ppx_derivers.1.0 │ │ │ │ └── opam │ │ │ ├── reason.3.4.0 │ │ │ │ └── opam │ │ │ └── result.1.3 │ │ │ │ └── opam │ │ └── overrides │ │ │ ├── opam__s__dune_opam__c__1.8.2_opam_override │ │ │ └── package.json │ │ │ ├── opam__s__merlin_extend_opam__c__0.3_opam_override │ │ │ ├── files │ │ │ │ └── merlin-extend-winfix.patch │ │ │ └── package.json │ │ │ ├── opam__s__ocamlbuild_opam__c__0.14.0_opam_override │ │ │ ├── files │ │ │ │ └── ocamlbuild-0.14.0.patch │ │ │ └── package.json │ │ │ └── opam__s__ocamlfind_opam__c__1.8.0_opam_override │ │ │ ├── files │ │ │ └── findlib-1.8.0.patch │ │ │ └── package.json │ └── src │ │ ├── One.re │ │ ├── Three.re │ │ ├── Two.re │ │ └── dune ├── dune │ ├── .vscode │ │ └── settings.json │ ├── both │ │ ├── A.re │ │ ├── B.re │ │ └── dune │ ├── dune-example.opam │ ├── dune-project │ ├── esy.json │ ├── esy.lock │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── index.json │ │ ├── opam │ │ │ ├── base-threads.base │ │ │ │ └── opam │ │ │ ├── base-unix.base │ │ │ │ └── opam │ │ │ ├── conf-m4.1 │ │ │ │ └── opam │ │ │ ├── cppo.1.6.6 │ │ │ │ └── opam │ │ │ ├── dune.1.11.4 │ │ │ │ └── opam │ │ │ ├── menhir.20190924 │ │ │ │ └── opam │ │ │ ├── merlin-extend.0.5 │ │ │ │ └── opam │ │ │ ├── ocaml-migrate-parsetree.1.5.0 │ │ │ │ └── opam │ │ │ ├── ocamlbuild.0.14.0 │ │ │ │ └── opam │ │ │ ├── ocamlfind.1.8.1 │ │ │ │ ├── files │ │ │ │ │ ├── ocaml-stub │ │ │ │ │ └── ocamlfind.install │ │ │ │ └── opam │ │ │ ├── ppx_derivers.1.2.1 │ │ │ │ └── opam │ │ │ ├── reason.3.5.2 │ │ │ │ └── opam │ │ │ └── result.1.4 │ │ │ │ └── opam │ │ └── overrides │ │ │ ├── opam__s__ocamlbuild_opam__c__0.14.0_opam_override │ │ │ ├── files │ │ │ │ └── ocamlbuild-0.14.0.patch │ │ │ └── package.json │ │ │ └── opam__s__ocamlfind_opam__c__1.8.1_opam_override │ │ │ ├── files │ │ │ └── findlib-1.8.1.patch │ │ │ └── package.json │ └── src │ │ ├── One.re │ │ ├── Three.re │ │ ├── Two.re │ │ └── dune ├── example-codemod │ ├── .vscode │ │ └── settings.json │ ├── bsconfig.json │ ├── package-lock.json │ ├── package.json │ └── src │ │ └── More.re ├── example-es6-imports │ ├── .vscode │ │ └── settings.json │ ├── bsconfig.json │ ├── package-lock.json │ ├── package.json │ └── src │ │ ├── Awesome.rei │ │ ├── Hello.bs.js │ │ ├── Hello.re │ │ ├── More.bs.js │ │ ├── More.re │ │ ├── Other.bs.js │ │ ├── Other.re │ │ ├── SomeFile.bs.js │ │ └── SomeFile.ml ├── example-esy-dune-project │ ├── .vscode │ │ └── settings.json │ ├── Readme.md │ ├── bin │ │ ├── Hello.re │ │ └── dune │ ├── dune-project │ ├── esy.lock.json │ ├── esy.lock │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── index.json │ │ ├── opam │ │ │ ├── base-threads.base │ │ │ │ └── opam │ │ │ ├── base-unix.base │ │ │ │ └── opam │ │ │ ├── biniou.1.2.0 │ │ │ │ └── opam │ │ │ ├── conf-m4.1 │ │ │ │ └── opam │ │ │ ├── conf-which.1 │ │ │ │ └── opam │ │ │ ├── cppo.1.6.5 │ │ │ │ └── opam │ │ │ ├── dune.1.8.2 │ │ │ │ └── opam │ │ │ ├── easy-format.1.3.1 │ │ │ │ └── opam │ │ │ ├── jbuilder.transition │ │ │ │ └── opam │ │ │ ├── menhir.20181113 │ │ │ │ └── opam │ │ │ ├── merlin-extend.0.3 │ │ │ │ └── opam │ │ │ ├── ocaml-migrate-parsetree.1.2.0 │ │ │ │ └── opam │ │ │ ├── ocamlbuild.0.14.0 │ │ │ │ └── opam │ │ │ ├── ocamlfind.1.8.0 │ │ │ │ ├── files │ │ │ │ │ ├── no-awk-check.patch │ │ │ │ │ ├── ocaml-stub │ │ │ │ │ └── ocamlfind.install │ │ │ │ └── opam │ │ │ ├── ppx_derivers.1.0 │ │ │ │ └── opam │ │ │ ├── re.1.7.3 │ │ │ │ └── opam │ │ │ ├── result.1.3 │ │ │ │ └── opam │ │ │ └── yojson.1.7.0 │ │ │ │ └── opam │ │ └── overrides │ │ │ ├── opam__s__dune_opam__c__1.8.2_opam_override │ │ │ └── package.json │ │ │ ├── opam__s__merlin_extend_opam__c__0.3_opam_override │ │ │ ├── files │ │ │ │ └── merlin-extend-winfix.patch │ │ │ └── package.json │ │ │ ├── opam__s__ocamlbuild_opam__c__0.14.0_opam_override │ │ │ ├── files │ │ │ │ └── ocamlbuild-0.14.0.patch │ │ │ └── package.json │ │ │ └── opam__s__ocamlfind_opam__c__1.8.0_opam_override │ │ │ ├── files │ │ │ └── findlib-1.8.0.patch │ │ │ └── package.json │ ├── hello.opam │ ├── lib │ │ ├── .merlin │ │ ├── Awesome.rei │ │ ├── Hello.re │ │ ├── More.re │ │ ├── Other.re │ │ ├── SomeFile.ml │ │ └── dune │ └── package.json ├── example-monorepo │ ├── .vscode │ │ └── settings.json │ ├── example-project │ │ ├── bsconfig.json │ │ ├── package-lock.json │ │ ├── package.json │ │ └── src │ │ │ ├── Hello.re │ │ │ ├── More.re │ │ │ └── Other.re │ ├── example-react │ │ ├── .gitignore │ │ ├── bsconfig.json │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ ├── Component1.bs.js │ │ │ ├── Component1.re │ │ │ ├── Component2.bs.js │ │ │ ├── Component2.re │ │ │ ├── Index.bs.js │ │ │ ├── Index.re │ │ │ └── index.html │ │ └── webpack.config.js │ └── package-lock.json ├── example-native-project │ ├── .vscode │ │ └── settings.json │ ├── bsconfig.json │ ├── package.json │ └── src │ │ ├── Files.re │ │ ├── Infix.re │ │ ├── Mainz.re │ │ └── Other.re ├── example-opam-dune-project │ ├── .vscode │ │ └── settings.json │ ├── dune-project │ ├── example-opam-dune.opam │ └── src │ │ ├── bin │ │ ├── Hello.re │ │ └── dune │ │ └── lib │ │ ├── Awesome.rei │ │ ├── Hello.re │ │ ├── Hi.ml │ │ ├── More.re │ │ ├── Other.re │ │ ├── SomeFile.ml │ │ └── dune ├── example-project │ ├── .vscode │ │ └── settings.json │ ├── bsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── Awesome.rei │ │ ├── Embeded.md │ │ ├── Hello.re │ │ ├── Json.re │ │ ├── More.re │ │ ├── More.rei │ │ ├── Other.re │ │ ├── Serde.ml │ │ ├── SomeFile.ml │ │ └── TransformHelpers.re │ └── types.json ├── example-react │ ├── .gitignore │ ├── .vscode │ │ └── settings.json │ ├── __tests__ │ │ ├── example_tests.bs.js │ │ └── example_tests.re │ ├── bsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── Component1.re │ │ ├── Component2.re │ │ ├── Index.re │ │ └── index.html │ └── webpack.config.js ├── example-workspace │ ├── .gitignore │ ├── .vscode │ │ └── settings.json │ ├── package.json │ ├── shared │ │ ├── .gitignore │ │ ├── README.md │ │ ├── bsconfig.json │ │ ├── package.json │ │ └── src │ │ │ ├── Box.re │ │ │ └── Utils.re │ ├── web │ │ ├── README.md │ │ ├── bsconfig.json │ │ ├── package.json │ │ └── src │ │ │ └── Index.re │ └── yarn.lock └── name_with_underscore │ ├── .gitignore │ ├── README.md │ ├── bsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── browsing.bs.js │ ├── browsing.re │ ├── e2e.bs.js │ └── e2e.re │ ├── tasks.json │ └── yarn.lock ├── logo.png ├── logo.svg ├── ocaml_typing ├── 402 │ ├── annot.mli │ ├── ast_helper.ml │ ├── ast_helper.mli │ ├── ast_mapper.ml │ ├── ast_mapper.mli │ ├── asttypes.mli │ ├── btype.ml │ ├── btype.mli │ ├── ccomp.ml │ ├── ccomp.mli │ ├── clflags.ml │ ├── clflags.mli │ ├── cmi_format.ml │ ├── cmi_format.mli │ ├── cmt_format.ml │ ├── cmt_format.mli │ ├── compenv.ml │ ├── compenv.mli │ ├── compmisc.ml │ ├── compmisc.mli │ ├── config.ml │ ├── config.mlbuild │ ├── config.mli │ ├── config.mlp │ ├── consistbl.ml │ ├── consistbl.mli │ ├── ctype.ml │ ├── ctype.mli │ ├── datarepr.ml │ ├── datarepr.mli │ ├── docstrings.ml │ ├── docstrings.mli │ ├── dune │ ├── env.ml │ ├── env.mli │ ├── envaux.ml │ ├── envaux.mli │ ├── ident.ml │ ├── ident.mli │ ├── includeclass.ml │ ├── includeclass.mli │ ├── includecore.ml │ ├── includecore.mli │ ├── includemod.ml │ ├── includemod.mli │ ├── lambda.ml │ ├── lambda.mli │ ├── lexer.ml │ ├── lexer.mli │ ├── lexer.mll │ ├── location.ml │ ├── location.mli │ ├── longident.ml │ ├── longident.mli │ ├── main_args.ml │ ├── main_args.mli │ ├── matching.ml │ ├── matching.mli │ ├── misc.ml │ ├── misc.mli │ ├── mtype.ml │ ├── mtype.mli │ ├── oprint.ml │ ├── oprint.mli │ ├── outcometree.mli │ ├── parmatch.ml │ ├── parmatch.mli │ ├── parse.ml │ ├── parse.mli │ ├── parser.ml │ ├── parser.mli │ ├── parser.mly │ ├── parsetree.mli │ ├── path.ml │ ├── path.mli │ ├── pparse.ml │ ├── pparse.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 │ ├── runtimedef.mli │ ├── simplif.ml │ ├── simplif.mli │ ├── stypes.ml │ ├── stypes.mli │ ├── subst.ml │ ├── subst.mli │ ├── switch.ml │ ├── switch.mli │ ├── syntaxerr.ml │ ├── syntaxerr.mli │ ├── tbl.ml │ ├── tbl.mli │ ├── terminfo.ml │ ├── terminfo.mli │ ├── translclass.ml │ ├── translclass.mli │ ├── translcore.ml │ ├── translcore.mli │ ├── translmod.ml │ ├── translmod.mli │ ├── translobj.ml │ ├── translobj.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 │ ├── warnings.ml │ └── warnings.mli ├── 406 │ ├── annot.mli │ ├── arg_helper.ml │ ├── arg_helper.mli │ ├── ast_helper.ml │ ├── ast_helper.mli │ ├── ast_invariants.ml │ ├── ast_invariants.mli │ ├── ast_iterator.ml │ ├── ast_iterator.mli │ ├── ast_mapper.ml │ ├── ast_mapper.mli │ ├── asttypes.mli │ ├── attr_helper.ml │ ├── attr_helper.mli │ ├── btype.ml │ ├── btype.mli │ ├── builtin_attributes.ml │ ├── builtin_attributes.mli │ ├── bytesections.ml │ ├── bytesections.mli │ ├── ccomp.ml │ ├── ccomp.mli │ ├── clflags.ml │ ├── clflags.mli │ ├── cmi_format.ml │ ├── cmi_format.mli │ ├── cmo_format.mli │ ├── cmt_format.ml │ ├── cmt_format.mli │ ├── compdynlink.mli │ ├── compenv.ml │ ├── compenv.mli │ ├── compmisc.ml │ ├── compmisc.mli │ ├── compplugin.ml │ ├── compplugin.mli │ ├── config.ml │ ├── config.mli │ ├── consistbl.ml │ ├── consistbl.mli │ ├── ctype.ml │ ├── ctype.mli │ ├── datarepr.ml │ ├── datarepr.mli │ ├── depend.ml │ ├── depend.mli │ ├── dll.ml │ ├── dll.mli │ ├── docstrings.ml │ ├── docstrings.mli │ ├── dune │ ├── env.ml │ ├── env.mli │ ├── envaux.ml │ ├── envaux.mli │ ├── ident.ml │ ├── ident.mli │ ├── identifiable.ml │ ├── identifiable.mli │ ├── includeclass.ml │ ├── includeclass.mli │ ├── includecore.ml │ ├── includecore.mli │ ├── includemod.ml │ ├── includemod.mli │ ├── lambda.ml │ ├── lambda.mli │ ├── lexer.ml │ ├── lexer.mli │ ├── location.ml │ ├── location.mli │ ├── longident.ml │ ├── longident.mli │ ├── main_args.ml │ ├── main_args.mli │ ├── makedepend.ml │ ├── makedepend.mli │ ├── matching.ml │ ├── matching.mli │ ├── meta.ml │ ├── meta.mli │ ├── misc.ml │ ├── misc.mli │ ├── mtype.ml │ ├── mtype.mli │ ├── numbers.ml │ ├── numbers.mli │ ├── opcodes.ml │ ├── oprint.ml │ ├── oprint.mli │ ├── outcometree.mli │ ├── parmatch.ml │ ├── parmatch.mli │ ├── parse.ml │ ├── parse.mli │ ├── parser.ml │ ├── parser.mli │ ├── parsetree.mli │ ├── path.ml │ ├── path.mli │ ├── pparse.ml │ ├── pparse.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 │ ├── profile.ml │ ├── profile.mli │ ├── runtimedef.ml │ ├── runtimedef.mli │ ├── semantics_of_primitives.ml │ ├── semantics_of_primitives.mli │ ├── simplif.ml │ ├── simplif.mli │ ├── strongly_connected_components.ml │ ├── strongly_connected_components.mli │ ├── stypes.ml │ ├── stypes.mli │ ├── subst.ml │ ├── subst.mli │ ├── switch.ml │ ├── switch.mli │ ├── symtable.ml │ ├── symtable.mli │ ├── syntaxerr.ml │ ├── syntaxerr.mli │ ├── targetint.ml │ ├── targetint.mli │ ├── tast_mapper.ml │ ├── tast_mapper.mli │ ├── tbl.ml │ ├── tbl.mli │ ├── terminfo.ml │ ├── terminfo.mli │ ├── translattribute.ml │ ├── translattribute.mli │ ├── translclass.ml │ ├── translclass.mli │ ├── translcore.ml │ ├── translcore.mli │ ├── translmod.ml │ ├── translmod.mli │ ├── translobj.ml │ ├── translobj.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 │ ├── warnings.ml │ └── warnings.mli ├── 407 │ ├── annot.mli │ ├── arg_helper.ml │ ├── arg_helper.mli │ ├── ast_helper.ml │ ├── ast_helper.mli │ ├── ast_invariants.ml │ ├── ast_invariants.mli │ ├── ast_iterator.ml │ ├── ast_iterator.mli │ ├── ast_mapper.ml │ ├── ast_mapper.mli │ ├── asttypes.mli │ ├── attr_helper.ml │ ├── attr_helper.mli │ ├── btype.ml │ ├── btype.mli │ ├── build_path_prefix_map.ml │ ├── build_path_prefix_map.mli │ ├── builtin_attributes.ml │ ├── builtin_attributes.mli │ ├── bytesections.ml │ ├── bytesections.mli │ ├── ccomp.ml │ ├── ccomp.mli │ ├── clflags.ml │ ├── clflags.mli │ ├── cmi_format.ml │ ├── cmi_format.mli │ ├── cmo_format.mli │ ├── cmt_format.ml │ ├── cmt_format.mli │ ├── compdynlink.mli │ ├── compenv.ml │ ├── compenv.mli │ ├── compmisc.ml │ ├── compmisc.mli │ ├── compplugin.ml │ ├── compplugin.mli │ ├── config.ml │ ├── config.mli │ ├── consistbl.ml │ ├── consistbl.mli │ ├── ctype.ml │ ├── ctype.mli │ ├── datarepr.ml │ ├── datarepr.mli │ ├── depend.ml │ ├── depend.mli │ ├── dll.ml │ ├── dll.mli │ ├── docstrings.ml │ ├── docstrings.mli │ ├── dune │ ├── env.ml │ ├── env.mli │ ├── envaux.ml │ ├── envaux.mli │ ├── ident.ml │ ├── ident.mli │ ├── identifiable.ml │ ├── identifiable.mli │ ├── includeclass.ml │ ├── includeclass.mli │ ├── includecore.ml │ ├── includecore.mli │ ├── includemod.ml │ ├── includemod.mli │ ├── lambda.ml │ ├── lambda.mli │ ├── lexer.ml │ ├── lexer.mli │ ├── location.ml │ ├── location.mli │ ├── longident.ml │ ├── longident.mli │ ├── main_args.ml │ ├── main_args.mli │ ├── makedepend.ml │ ├── makedepend.mli │ ├── matching.ml │ ├── matching.mli │ ├── meta.ml │ ├── meta.mli │ ├── misc.ml │ ├── misc.mli │ ├── mtype.ml │ ├── mtype.mli │ ├── numbers.ml │ ├── numbers.mli │ ├── opcodes.ml │ ├── oprint.ml │ ├── oprint.mli │ ├── outcometree.mli │ ├── parmatch.ml │ ├── parmatch.mli │ ├── parse.ml │ ├── parse.mli │ ├── parser.ml │ ├── parser.mli │ ├── parsetree.mli │ ├── path.ml │ ├── path.mli │ ├── pparse.ml │ ├── pparse.mli │ ├── pprintast.ml │ ├── pprintast.mli │ ├── predef.ml │ ├── predef.mli │ ├── primitive.ml │ ├── primitive.mli │ ├── printast.ml │ ├── printast.mli │ ├── printlambda.ml │ ├── printlambda.mli │ ├── printpat.ml │ ├── printpat.mli │ ├── printtyp.ml │ ├── printtyp.mli │ ├── printtyped.ml │ ├── printtyped.mli │ ├── profile.ml │ ├── profile.mli │ ├── runtimedef.ml │ ├── runtimedef.mli │ ├── semantics_of_primitives.ml │ ├── semantics_of_primitives.mli │ ├── simplif.ml │ ├── simplif.mli │ ├── strongly_connected_components.ml │ ├── strongly_connected_components.mli │ ├── stypes.ml │ ├── stypes.mli │ ├── subst.ml │ ├── subst.mli │ ├── switch.ml │ ├── switch.mli │ ├── symtable.ml │ ├── symtable.mli │ ├── syntaxerr.ml │ ├── syntaxerr.mli │ ├── targetint.ml │ ├── targetint.mli │ ├── tast_mapper.ml │ ├── tast_mapper.mli │ ├── tbl.ml │ ├── tbl.mli │ ├── terminfo.ml │ ├── terminfo.mli │ ├── translattribute.ml │ ├── translattribute.mli │ ├── translclass.ml │ ├── translclass.mli │ ├── translcore.ml │ ├── translcore.mli │ ├── translmod.ml │ ├── translmod.mli │ ├── translobj.ml │ ├── translobj.mli │ ├── translprim.ml │ ├── translprim.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 │ ├── warnings.ml │ └── warnings.mli ├── 408 │ ├── Compiler_libs_408.re │ └── dune ├── assemble.js └── current │ ├── Current.ml │ └── dune ├── old_ocamls └── 407 │ ├── dune-project │ ├── esy.json │ └── esy.lock │ ├── .gitattributes │ ├── .gitignore │ ├── index.json │ ├── opam │ ├── base-threads.base │ │ └── opam │ ├── base-unix.base │ │ └── opam │ ├── conf-m4.1 │ │ └── opam │ ├── cppo.1.6.6 │ │ └── opam │ ├── dune.1.11.4 │ │ └── opam │ ├── menhir.20190924 │ │ └── opam │ ├── merlin-extend.0.5 │ │ └── opam │ ├── ocaml-migrate-parsetree.1.5.0 │ │ └── opam │ ├── ocamlbuild.0.14.0 │ │ └── opam │ ├── ocamlfind.1.8.1 │ │ ├── files │ │ │ ├── ocaml-stub │ │ │ └── ocamlfind.install │ │ └── opam │ ├── ppx_derivers.1.2.1 │ │ └── opam │ └── result.1.4 │ │ └── opam │ └── overrides │ ├── opam__s__ocamlbuild_opam__c__0.14.0_opam_override │ ├── files │ │ └── ocamlbuild-0.14.0.patch │ └── package.json │ └── opam__s__ocamlfind_opam__c__1.8.1_opam_override │ ├── files │ └── findlib-1.8.1.patch │ └── package.json ├── package.json ├── pp ├── Pp.re ├── dune └── pp.js ├── ppx ├── Ppx_Monads.re └── dune ├── process_ocaml ├── 402 │ ├── PrintType.re │ ├── ProcessAttributes.re │ ├── ProcessCmt.re │ ├── ProcessExtra.re │ ├── Process_402.re │ ├── Process_402.rei │ ├── Shared.re │ └── dune ├── 406 │ ├── PrintType.re │ ├── ProcessAttributes.re │ ├── ProcessCmt.re │ ├── ProcessExtra.re │ ├── Process_406.re │ ├── Process_406.rei │ ├── Shared.re │ └── dune ├── 407 │ ├── PrintType.re │ ├── ProcessAttributes.re │ ├── ProcessCmt.re │ ├── ProcessExtra.re │ ├── Process_407.re │ ├── Process_407.rei │ ├── Shared.re │ └── dune ├── 408 │ ├── PrintType.re │ ├── ProcessAttributes.re │ ├── ProcessCmt.re │ ├── ProcessExtra.re │ ├── Process_408.re │ ├── Process_408.rei │ ├── Shared.re │ └── dune ├── base │ ├── PrintType.re │ ├── ProcessAttributes.re │ ├── ProcessCmt.re │ ├── ProcessExtra.re │ └── Shared.re └── build.sh ├── reason-language-server.opam ├── release.sh ├── relite ├── Example.re ├── Expect.re ├── Files.re ├── Relite.re ├── Reporter.re ├── Runner.re ├── Suite.re ├── Types.re └── dune ├── runtests.sh ├── src ├── analyze │ ├── AsYouType.re │ ├── BuildCommand.re │ ├── BuildSystem.re │ ├── ErrorParser.re │ ├── FindFiles.re │ ├── Hover.re │ ├── NewCompletions.re │ ├── Packages.re │ ├── PartialParser.re │ ├── State.re │ ├── TopTypes.re │ └── dune ├── analyze_example_tests │ ├── ExamplesTests.re │ └── dune ├── analyze_fixture_tests │ ├── AnalyzeFixtureTests.re │ ├── TestCodeLens.re │ ├── TestCodeLens.txt │ ├── TestCompletions.re │ ├── TestCompletions.txt │ ├── TestDefinition.re │ ├── TestDefinition.txt │ ├── TestHover.re │ ├── TestHover.txt │ ├── TestJbuildFile.re │ ├── TestJbuildFile.txt │ ├── TestReferences.re │ ├── TestReferences.txt │ ├── TestSignatureHelp.re │ ├── dune │ └── lib │ │ ├── TestParser.re │ │ └── TestUtils.re ├── full_tests │ ├── FullTests.re │ └── dune └── lsp │ ├── BasicServer.re │ ├── Diagnostics.re │ ├── Main.re │ ├── MessageHandlers.re │ ├── NotificationHandlers.re │ ├── Protocol.re │ ├── Rpc.re │ └── dune ├── test ├── RunTests.re ├── TestFramework.re └── dune ├── unexceptional ├── Readme.md └── tests │ ├── basic.re │ └── records.re ├── util ├── Commands.re ├── Files.re ├── Infix.re ├── JbuildFile.re ├── JsonShort.re ├── Log.re ├── MarkdownOfOCamldoc.re ├── MerlinFile.re ├── MerlinFile.rei ├── ModuleResolution.re ├── Monads.re ├── PrepareUtils.re ├── Pretty.ml ├── Pretty.mli ├── RJson.re ├── RResult.re ├── Result.re ├── Semver.re ├── Semver.rei ├── Utils.re └── dune ├── util_tests ├── UtilTests.re └── dune └── vendor ├── Json.re ├── dune ├── odoc_parser ├── LICENSE.md ├── Readme.md ├── ast.ml ├── comment.ml ├── error.ml ├── helpers.ml ├── lang.ml ├── location_.ml ├── odoc_lexer.ml ├── odoc_lexer.mli ├── odoc_lexer.mll ├── parse_error.ml ├── parser_.ml ├── parser_.mli ├── paths.ml ├── paths.mli ├── paths_types.ml ├── root.ml ├── root.mli ├── semantics.ml ├── semantics.mli ├── syntax.ml ├── syntax.mli └── token.ml └── omd ├── Readme.md ├── html_characters.ml ├── omd.ml ├── omd.mli ├── omd_backend.ml ├── omd_backend.mli ├── omd_html.ml ├── omd_lexer.ml ├── omd_lexer.mli ├── omd_parser.ml ├── omd_parser.mli ├── omd_representation.ml ├── omd_representation.mli ├── omd_types.ml ├── omd_utils.ml ├── omd_utils.mli ├── omd_xtxt.ml └── omd_xtxt.mli /.ci/use-node.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - task: NodeTool@0 3 | displayName: 'Use Node 8.x' 4 | inputs: 5 | versionSpec: 8.x 6 | -------------------------------------------------------------------------------- /.ci/utils/publish-build-cache.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - pwsh: Copy-Item -Path $(ESY__CACHE_INSTALL_PATH) -Destination $(CACHE_FOLDER) -Recurse 3 | displayName: '[Cache][Publish] Copy builds to be cached' 4 | -------------------------------------------------------------------------------- /.ci/utils/use-esy.yml: -------------------------------------------------------------------------------- 1 | # steps to install esy globally 2 | 3 | steps: 4 | - script: "npm install -g esy@0.5.8" 5 | displayName: "install esy" 6 | -------------------------------------------------------------------------------- /.ci/utils/use-node.yml: -------------------------------------------------------------------------------- 1 | # steps to use node on agent 2 | 3 | steps: 4 | - task: NodeTool@0 5 | displayName: "Use Node 8.x" 6 | inputs: 7 | versionSpec: 8.x 8 | -------------------------------------------------------------------------------- /.circleci/config.osx.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | 5 | # Specify the Xcode version to use 6 | macos: 7 | xcode: "8.3.3" 8 | 9 | steps: 10 | - checkout 11 | 12 | # Install CocoaPods 13 | - run: 14 | name: Install CocoaPods 15 | command: pod install 16 | 17 | # Build the app and run tests 18 | - run: 19 | name: Build and run tests 20 | command: fastlane scan 21 | environment: 22 | SCAN_DEVICE: iPhone 6 23 | SCAN_SCHEME: WebTests 24 | 25 | # Collect XML test results data to show in the UI, 26 | # and save the same XML files under test-results folder 27 | # in the Artifacts tab 28 | - store_test_results: 29 | path: test_output/report.xml 30 | - store_artifacts: 31 | path: /tmp/test-results 32 | destination: scan-test-results 33 | - store_artifacts: 34 | path: ~/Library/Logs/scan 35 | destination: scan-logs 36 | -------------------------------------------------------------------------------- /.circleci/try-config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | curl --user `cat ~/.ssh/circle-token`: \ 3 | --request POST \ 4 | --form revision=c1bd97a7e136cd54f6ec00048776f5badaa361a6\ 5 | --form config=@config.yml \ 6 | --form notify=false \ 7 | https://circleci.com/api/v1.1/project/github/jaredly/reason-language-server/tree/master 8 | 9 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | types.lock.json binary 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Let us know what's not working right 4 | 5 | --- 6 | 7 | Please include steps needed to reproduce the bug, along any relevant sections of the log file, located at `node_modules/.lsp/debug.log` 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | Let us know what you'd like to see! 8 | -------------------------------------------------------------------------------- /.github/actions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@actions/core": "^1.2.0", 4 | "@actions/github": "^2.0.0" 5 | }, 6 | "version": "1.1.1" 7 | } 8 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: 4 | - master 5 | pull_request: 6 | branches: 7 | - master 8 | 9 | jobs: 10 | build: 11 | name: Revery CI 12 | 13 | runs-on: ${{ matrix.os }} 14 | 15 | strategy: 16 | matrix: 17 | os: [ubuntu-latest, windows-latest, macOS-latest] 18 | node-version: [10.x] 19 | 20 | steps: 21 | - uses: actions/checkout@v1 22 | - name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os}} 23 | uses: actions/setup-node@v1 24 | with: 25 | node-version: ${{ matrix.node-version }} 26 | - name: install esy 27 | run: | 28 | npm install -g esy 29 | 30 | - uses: actions/cache@v1 31 | if: matrix.os == 'windows-latest' 32 | with: 33 | path: ~/.esy 34 | key: ${{ runner.os }}-node-${{ hashFiles('esy.lock/**') }} 35 | restore-keys: | 36 | ${{ runner.os }}-node- 37 | 38 | - name: Esy 39 | run: esy 40 | - name: Running some tests 41 | run: ./runtests.sh 42 | shell: bash 43 | 44 | - name: rm the esy build stuff, don't need to cache that 45 | if: matrix.os == 'windows-latest' 46 | run: npx rimraf ~/.esy/3_*/b/ 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .merlin 3 | .bsb.lock 4 | npm-debug.log 5 | /lib/ 6 | examples/**/lib 7 | examples/*/_build 8 | examples/*/_opam 9 | examples/*/node_modules 10 | node_modules 11 | node_modules/ 12 | log_types.txt 13 | *.install 14 | _esy 15 | _build 16 | _esy 17 | static/codemirror-5.36.0 18 | _old 19 | tmp 20 | *.vsix 21 | examples/markdown-reason-react/ 22 | editor-extensions/vscode/*.zip 23 | editor-extensions/vscode/src/syntaxes/out 24 | bsb_modules 25 | _esy/ 26 | bin.exe 27 | .test-failures 28 | RunTests.exe 29 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | editor-extensions 2 | examples 3 | _build 4 | _esy 5 | ExamplesTests.exe 6 | .github 7 | .vscode 8 | .circleci 9 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": false, 3 | "[reason]": { 4 | "editor.formatOnSave": false 5 | }, 6 | "git.ignoreLimitWarning": true, 7 | "git.enabled": true, 8 | "editor.codeLens": true, 9 | // "reason_language_server.location": "./lib/bs/native/bin.native", 10 | "reason_language_server.location": "./bin.exe", 11 | // "reason_language_server.show_debug_errors": true, 12 | "reason_language_server.format_width": 100, 13 | // "reason_language_server.location": "./lib/bs/native/bin.native.exe", 14 | // "reason_language_server.reloadOnChange": true, 15 | "editor.tabSize": 2, 16 | "workbench.settings.editor": "json" 17 | } 18 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | ] 5 | } -------------------------------------------------------------------------------- /Changelog.md: -------------------------------------------------------------------------------- 1 | 2 | ## [pending] 3 | 4 | - Enable comment syntax highlighting in jsx attributes #155 5 | 6 | ## 1.2.3 7 | TODO update 8 | 9 | ## 1.0.4 10 | 11 | - better support for interface files 12 | - improved hover text 13 | 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Jared Forsyth and contributors. 4 | 5 | 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: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | 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. -------------------------------------------------------------------------------- /belt/belt_Option.ml: -------------------------------------------------------------------------------- 1 | let getExn = 2 | function 3 | | Some x -> x 4 | | None -> Js.Exn.raiseError "File \"\", line 28, characters 14-20" 5 | let mapWithDefaultU opt default f = 6 | match opt with | Some x -> f x | None -> default 7 | let mapWithDefault opt default f = 8 | mapWithDefaultU opt default (fun x -> f x) 9 | let mapU opt f = match opt with | Some x -> Some (f x) | None -> None 10 | let map opt f = mapU opt (fun x -> f x) 11 | let flatMapU opt f = match opt with | Some x -> f x | None -> None 12 | let flatMap opt f = flatMapU opt (fun x -> f x) 13 | let getWithDefault opt default = 14 | match opt with | Some x -> x | None -> default 15 | let isSome = function | Some _ -> true | None -> false 16 | let isNone = function | Some _ -> false | None -> true 17 | let eqU a b f = 18 | match (a, b) with 19 | | (Some a,Some b) -> f a b 20 | | (None ,Some _)|(Some _,None ) -> false 21 | | (None ,None ) -> true 22 | let eq a b f = eqU a b (fun x -> fun y -> f x y) 23 | let cmpU a b f = 24 | match (a, b) with 25 | | (Some a,Some b) -> f a b 26 | | (None ,Some _) -> (-1) 27 | | (Some _,None ) -> 1 28 | | (None ,None ) -> 0 29 | let cmp a b f = cmpU a b (fun x -> fun y -> f x y) -------------------------------------------------------------------------------- /belt/belt_Range.ml: -------------------------------------------------------------------------------- 1 | let forEachU s f action = for i = s to f do (action i : unit) done 2 | let forEach s f action = forEachU s f (fun a -> action a) 3 | let rec everyU s f p = if s > f then true else (p s) && (everyU (s + 1) f p) 4 | let every s f p = everyU s f (fun a -> p a) 5 | let rec everyByAux s f ~step p = 6 | if s > f then true else (p s) && (everyByAux (s + step) f ~step p) 7 | let everyByU s f ~step p = if step > 0 then everyByAux s f ~step p else true 8 | let everyBy s f ~step p = everyByU s f ~step (fun a -> p a) 9 | let rec someU s f p = if s > f then false else (p s) || (someU (s + 1) f p) 10 | let some s f p = someU s f (fun a -> p a) 11 | let rec someByAux s f ~step p = 12 | if s > f then false else (p s) || (someByAux (s + step) f ~step p) 13 | let someByU s f ~step p = if step > 0 then someByAux s f ~step p else false 14 | let someBy s f ~step p = someByU s f ~step (fun a -> p a) -------------------------------------------------------------------------------- /belt/convert.sh: -------------------------------------------------------------------------------- 1 | set -e 2 | for i in src/*.ml; do 3 | COMPILE_TO_NATIVE=true ../bsb_modules/bs-platform/lib/bspp.exe $i | ../bsb_modules/bs-platform/lib/bsrefmt --parse ml --print binary > $i.bin 4 | COMPILE_TO_NATIVE=1 ../bsb_modules/bs-platform/lib/belt_bsppx.exe $i.bin $i.bin2 5 | ../bsb_modules/bs-platform/lib/bsrefmt --parse binary $i.bin2 --print ml > $(basename $i) 6 | rm $i.bin $i.bin2 7 | done 8 | -------------------------------------------------------------------------------- /belt/dune: -------------------------------------------------------------------------------- 1 | (include_subdirs unqualified) 2 | 3 | (library 4 | (public_name reason-language-server.Belt) 5 | (c_names stubs) 6 | (flags :standard -w -A) 7 | (name Belt)) -------------------------------------------------------------------------------- /belt/js.ml: -------------------------------------------------------------------------------- 1 | type 'a null = 'a option 2 | type 'a undefined = 'a option 3 | external toOpt : 'a null -> 'a option = "%identity" 4 | external nullToOption : 'a null -> 'a option = "%identity" 5 | external undefinedToOption : 'a null -> 'a option = "%identity" 6 | external fromOpt : 'a option -> 'a undefined = "%identity" 7 | let undefined = None 8 | let null = None 9 | let empty = None 10 | let log a = let _ = Obj.magic a in () 11 | module Undefined = 12 | struct 13 | type 'a t = 'a undefined 14 | external return : 'a -> 'a t = "%identity" 15 | let empty = None 16 | external toOption : 'a t -> 'a option = "%identity" 17 | external fromOpt : 'a option -> 'a t = "%identity" 18 | end 19 | module Null = 20 | struct 21 | type 'a t = 'a null 22 | external toOption : 'a t -> 'a option = "%identity" 23 | external fromOpt : 'a option -> 'a t = "%identity" 24 | let return a = fromOpt (Some a) 25 | let getUnsafe a = 26 | match toOption a with | None -> assert false | Some a -> a 27 | end 28 | module Exn = struct let raiseError _str = assert false end -------------------------------------------------------------------------------- /belt/js_math.ml: -------------------------------------------------------------------------------- 1 | let random_int min max = (Random.int (max - min)) + min -------------------------------------------------------------------------------- /belt/stubs.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | CAMLprim value belt_makemutablelist(value a, value l) { 6 | CAMLparam2(a, l); 7 | CAMLlocal1(box); 8 | box = caml_alloc_small(2, 0); 9 | Field(box, 0) = a; 10 | Field(box, 1) = l; 11 | CAMLreturn(box); 12 | } 13 | -------------------------------------------------------------------------------- /belt_ppx/dune: -------------------------------------------------------------------------------- 1 | 2 | (library 3 | (name Belt_ppx) 4 | (public_name reason-language-server.Belt_ppx) 5 | (flags :standard -w -9) 6 | (libraries compiler-libs ocaml-migrate-parsetree ppx_tools_versioned) 7 | (preprocess (pps ppx_tools_versioned.metaquot_402)) 8 | (kind ppx_rewriter)) 9 | -------------------------------------------------------------------------------- /belt_src/js.ml: -------------------------------------------------------------------------------- 1 | type 'a null = 'a option 2 | 3 | type 'a undefined = 'a option 4 | 5 | external toOpt : 'a null -> 'a option = "%identity" 6 | 7 | external nullToOption : 'a null -> 'a option = "%identity" 8 | 9 | external undefinedToOption : 'a null -> 'a option = "%identity" 10 | 11 | external fromOpt : 'a option -> 'a undefined = "%identity" 12 | 13 | let undefined = None 14 | 15 | let null = None 16 | 17 | let empty = None 18 | 19 | let log a = 20 | let _ = Obj.magic a in 21 | () 22 | 23 | module Undefined = struct 24 | type 'a t = 'a undefined 25 | external return : 'a -> 'a t = "%identity" 26 | let empty = None 27 | external toOption : 'a t -> 'a option = "%identity" 28 | external fromOpt : 'a option -> 'a t = "%identity" 29 | end 30 | 31 | module Null = struct 32 | type 'a t = 'a null 33 | 34 | external toOption : 'a t -> 'a option = "%identity" 35 | external fromOpt : 'a option -> 'a t = "%identity" 36 | 37 | let return a = fromOpt (Some a) 38 | let getUnsafe a = match toOption a with 39 | | None -> assert false 40 | | Some a -> a 41 | end 42 | 43 | 44 | module Exn = struct 45 | let raiseError _str = assert false 46 | end 47 | -------------------------------------------------------------------------------- /bin/Bin.re: -------------------------------------------------------------------------------- 1 | Printexc.record_backtrace(true); 2 | 3 | let () = Lsp.Main.main(); -------------------------------------------------------------------------------- /bin/dune: -------------------------------------------------------------------------------- 1 | 2 | (executable 3 | (name Bin) 4 | (public_name Bin) 5 | (libraries Lsp) 6 | (modules Bin) 7 | (flags :standard -w -9) 8 | (preprocess (pps Belt_ppx Ppx_monads)) 9 | ) 10 | -------------------------------------------------------------------------------- /core/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (wrapped false) 3 | (name Core) 4 | (public_name reason-language-server.Core) 5 | (libraries Belt Vendor str Util Current) 6 | (flags :standard -open Vendor -open Util -w -9) 7 | (preprocess 8 | (pps Belt_ppx Ppx_monads))) 9 | -------------------------------------------------------------------------------- /dune: -------------------------------------------------------------------------------- 1 | (ignored_subdirs ( 2 | examples 3 | node_modules 4 | )) 5 | 6 | (env 7 | (dev 8 | (flags (:standard -warn-error -A)))) -------------------------------------------------------------------------------- /dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.1) 2 | -------------------------------------------------------------------------------- /editor-extensions/coc.nvim/.eslintignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | 3 | -------------------------------------------------------------------------------- /editor-extensions/coc.nvim/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | extends: airbnb-base 2 | parser: babel-eslint 3 | 4 | rules: 5 | import/no-extraneous-dependencies: 'off' 6 | import/prefer-default-export: 'off' 7 | arrow-parens: 'off' 8 | object-curly-newline: 'off' 9 | -------------------------------------------------------------------------------- /editor-extensions/coc.nvim/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | [include] 4 | 5 | [libs] 6 | 7 | [lints] 8 | 9 | [options] 10 | 11 | [strict] 12 | 13 | [version] 14 | 0.108.0 15 | -------------------------------------------------------------------------------- /editor-extensions/coc.nvim/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | lib/ 3 | rls/rls-*/ 4 | rls/rls-*.zip 5 | 6 | -------------------------------------------------------------------------------- /editor-extensions/coc.nvim/.npmignore: -------------------------------------------------------------------------------- 1 | .vim/ 2 | src/ 3 | .eslintignore 4 | .eslintrc.yml 5 | .flowconfig 6 | .prettierrc.yml 7 | babel.config.js 8 | webpack.config.js 9 | *.log 10 | *.tgz 11 | 12 | rls/rls-*/ 13 | rls/rls-*.zip 14 | 15 | -------------------------------------------------------------------------------- /editor-extensions/coc.nvim/.prettierrc.yml: -------------------------------------------------------------------------------- 1 | printWidth: 120 2 | tabWidth: 2 3 | semi: true 4 | singleQuote: true 5 | jsxSingleQuote: false 6 | trailingComma: all 7 | bracketSpacing: true 8 | jsxBracketSameLine: false 9 | endOfLine: lf 10 | -------------------------------------------------------------------------------- /editor-extensions/coc.nvim/.vim/coc-settings.json: -------------------------------------------------------------------------------- 1 | { "tsserver.enable": false } 2 | -------------------------------------------------------------------------------- /editor-extensions/coc.nvim/README.md: -------------------------------------------------------------------------------- 1 | # coc-reason 2 | 3 | Reason language server extension for [`coc.nvim`](https://github.com/neoclide/coc.nvim). 4 | 5 | ## Install 6 | 7 | 1. Inside (neo)vim run this command: 8 | 9 | ``` 10 | :CocInstall coc-reason 11 | ``` 12 | 13 | Note: for coc installation instructions visit [`coc.nvim`](https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim) repo 14 | 15 | ## Features 16 | * Code completion 17 | * Go to definition 18 | * Diagnostics 19 | * Find references 20 | * Hover for type info 21 | * Format file 22 | 23 | ## License 24 | 25 | MIT 26 | 27 | -------------------------------------------------------------------------------- /editor-extensions/coc.nvim/babel.config.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | presets: [ 3 | [ 4 | '@babel/env', 5 | { 6 | targets: { 7 | node: '10', 8 | }, 9 | }, 10 | ], 11 | '@babel/flow', 12 | ], 13 | }; 14 | 15 | module.exports = config; 16 | -------------------------------------------------------------------------------- /editor-extensions/coc.nvim/rls/CURRENT: -------------------------------------------------------------------------------- 1 | 1.7.11 2 | -------------------------------------------------------------------------------- /editor-extensions/coc.nvim/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | const config = { 4 | mode: 'production', 5 | target: 'node', 6 | entry: './src/index', 7 | externals: { 8 | 'coc.nvim': 'commonjs coc.nvim', 9 | }, 10 | module: { 11 | rules: [ 12 | { 13 | test: /\.js$/, 14 | exclude: /node_modules/, 15 | use: [{ loader: 'babel-loader' }], 16 | }, 17 | ], 18 | }, 19 | output: { 20 | path: path.join(__dirname, 'lib'), 21 | filename: 'index.js', 22 | libraryTarget: 'commonjs', 23 | }, 24 | }; 25 | 26 | module.exports = config; 27 | -------------------------------------------------------------------------------- /editor-extensions/vscode/.vscodeignore: -------------------------------------------------------------------------------- 1 | *.zip 2 | *.vsix 3 | logo.sketch 4 | -------------------------------------------------------------------------------- /editor-extensions/vscode/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Jared Forsyth and contributors. 4 | 5 | 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: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | 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. -------------------------------------------------------------------------------- /editor-extensions/vscode/bin.native: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/editor-extensions/vscode/bin.native -------------------------------------------------------------------------------- /editor-extensions/vscode/bin.native.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/editor-extensions/vscode/bin.native.exe -------------------------------------------------------------------------------- /editor-extensions/vscode/bin.native.linux: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/editor-extensions/vscode/bin.native.linux -------------------------------------------------------------------------------- /editor-extensions/vscode/linux.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/editor-extensions/vscode/linux.zip -------------------------------------------------------------------------------- /editor-extensions/vscode/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/editor-extensions/vscode/logo.png -------------------------------------------------------------------------------- /editor-extensions/vscode/logo.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/editor-extensions/vscode/logo.sketch -------------------------------------------------------------------------------- /editor-extensions/vscode/macos.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/editor-extensions/vscode/macos.zip -------------------------------------------------------------------------------- /editor-extensions/vscode/ocaml.configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoClosingPairs": [ 3 | { "open": "{", "close": "}" }, 4 | { "open": "[", "close": "]" }, 5 | { "open": "(", "close": ")" }, 6 | { "open": "\"", "close": "\"", "notIn": [ "string" ] }, 7 | { "open": "(**", "close": " *", "notIn": [ "string" ] } 8 | ], 9 | "brackets": [ 10 | [ "{", "}" ], 11 | [ "[", "]" ], 12 | [ "(", ")" ] 13 | ], 14 | "comments": { 15 | "blockComment": [ "(*", "*)" ] 16 | }, 17 | "surroundingPairs": [ 18 | [ "{", "}" ], 19 | [ "[", "]" ], 20 | [ "(", ")" ], 21 | [ "'", "'" ], 22 | [ "\"", "\"" ], 23 | [ "`", "`" ] 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /editor-extensions/vscode/reason-lisp.configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | "lineComment": ";", 4 | "blockComment": ["(*", "*)"] 5 | }, 6 | "brackets": [ 7 | ["{", "}"], 8 | ["[", "]"], 9 | ["(", ")"] 10 | ], 11 | "autoClosingPairs": [ 12 | ["{", "}"], 13 | ["[", "]"], 14 | ["(", ")"], 15 | ["\"", "\""] 16 | ], 17 | "surroundingPairs": [ 18 | ["{", "}"], 19 | ["[", "]"], 20 | ["(", ")"], 21 | ["\"", "\""] 22 | ], 23 | "folding": { 24 | "offSide": true 25 | } 26 | } -------------------------------------------------------------------------------- /editor-extensions/vscode/reason.configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoClosingPairs": [ 3 | { "open": "{", "close": "}" }, 4 | { "open": "[", "close": "]" }, 5 | { "open": "(", "close": ")" }, 6 | { "open": "\"", "close": "\"", "notIn": [ "string" ] }, 7 | { "open": "/**", "close": " */", "notIn": [ "string" ] } 8 | ], 9 | "brackets": [ 10 | [ "{", "}" ], 11 | [ "[", "]" ], 12 | [ "(", ")" ] 13 | ], 14 | "comments": { 15 | "lineComment": "//", 16 | "blockComment": [ "/*", "*/" ] 17 | }, 18 | "surroundingPairs": [ 19 | [ "{", "}" ], 20 | [ "[", "]" ], 21 | [ "(", ")" ], 22 | [ "'", "'" ], 23 | [ "\"", "\"" ], 24 | [ "`", "`" ] 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /editor-extensions/vscode/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/editor-extensions/vscode/screenshot.png -------------------------------------------------------------------------------- /editor-extensions/vscode/script/syntax.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const fs = require("fs"); 4 | const path = require("path"); 5 | const languages = ["ocaml"]; 6 | 7 | function inPath(language) { 8 | return path.resolve(".", "src", "syntaxes", "out", language); 9 | } 10 | 11 | function outPath(language) { 12 | return path.resolve(".", `${language}.json`); 13 | } 14 | 15 | for (const language of languages) { 16 | const from = inPath(language); 17 | const into = outPath(language); 18 | const data = require(from); 19 | const json = JSON.stringify(data.default); 20 | fs.writeFileSync(into, json); 21 | } 22 | -------------------------------------------------------------------------------- /editor-extensions/vscode/snippets/snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "let (block)": { 3 | "prefix": "let", 4 | "body": [ 5 | "let ${1:pattern} = {", 6 | "\t$0", 7 | "};" 8 | ] 9 | }, 10 | "function": { 11 | "prefix": "let", 12 | "body": [ 13 | "let ${1:name} = (${2:args}) => $0;" 14 | ] 15 | }, 16 | "function (block)": { 17 | "prefix": "let", 18 | "body": [ 19 | "let ${1:f} = (${2:args}) => {", 20 | "\t$0;", 21 | "};" 22 | ] 23 | }, 24 | "module (block)": { 25 | "prefix": "module", 26 | "body": [ 27 | "module ${1:M} = {", 28 | "\t$0", 29 | "};" 30 | ] 31 | }, 32 | "switch": { 33 | "prefix": "switch", 34 | "body": [ 35 | "switch ${1:scrutinee} {", 36 | "| ${2:pattern} => ${3:${2:pattern}}", 37 | "};" 38 | ] 39 | } 40 | } -------------------------------------------------------------------------------- /editor-extensions/vscode/src/syntaxes/schema.ts: -------------------------------------------------------------------------------- 1 | export interface IPatterns extends Array {} 2 | 3 | export interface IGrammar { 4 | name: string; 5 | scopeName: string; 6 | fileTypes: string[]; 7 | patterns: IPatterns; 8 | repository: IRepository; 9 | } 10 | 11 | export interface IMatchScopes { 12 | [key: string]: RuleSimple; 13 | } 14 | 15 | export type Rule = RuleSimple | IRuleCapturing | IRuleDelimited | IRuleReference; 16 | 17 | export interface IRuleCapturing { 18 | match: string; 19 | name?: string; 20 | captures?: IMatchScopes; 21 | patterns?: IPatterns; 22 | } 23 | 24 | export interface IRuleDelimited { 25 | begin: string; 26 | end: string; 27 | applyEndPatternLast?: boolean; 28 | name?: string; 29 | contentName?: string; 30 | beginCaptures?: IMatchScopes; 31 | endCaptures?: IMatchScopes; 32 | patterns?: IPatterns; 33 | } 34 | 35 | export interface IRuleReference { 36 | include: string; 37 | } 38 | 39 | export type RuleSimple = 40 | | { 41 | name: string; 42 | patterns?: IPatterns; 43 | } 44 | | { 45 | name?: string; 46 | patterns: IPatterns; 47 | }; 48 | 49 | export interface IRepository { 50 | [key: string]: Rule; 51 | } 52 | -------------------------------------------------------------------------------- /editor-extensions/vscode/src/syntaxes/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowUnreachableCode": false, 4 | "allowUnusedLabels": false, 5 | "experimentalDecorators": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "lib": [ 8 | "dom", 9 | "esnext" 10 | ], 11 | "module": "commonjs", 12 | "moduleResolution": "node", 13 | "newLine": "LF", 14 | "noEmitOnError": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitAny": true, 17 | "noImplicitReturns": true, 18 | "noImplicitThis": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "outDir": "out", 22 | "pretty": true, 23 | "removeComments": true, 24 | "rootDir": ".", 25 | "skipLibCheck": true, 26 | "sourceMap": true, 27 | "strict": true, 28 | "suppressImplicitAnyIndexErrors": false, 29 | "target": "esnext" 30 | }, 31 | "exclude": [ 32 | "node_modules", 33 | "out", 34 | ".vscode-test" 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /editor-extensions/vscode/windows.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/editor-extensions/vscode/windows.zip -------------------------------------------------------------------------------- /esy.lock/.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 | * text eol=lf linguist-generated 4 | -------------------------------------------------------------------------------- /esy.lock/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 | !* 4 | -------------------------------------------------------------------------------- /esy.lock/opam/ANSITerminal.0.8.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Christophe Troestler " 3 | authors: [ "Christophe Troestler" 4 | "Vincent Hugot" ] 5 | license: "LGPL-3.0-only with OCaml-LGPL-linking-exception" 6 | homepage: "https://github.com/Chris00/ANSITerminal" 7 | dev-repo: "git+https://github.com/Chris00/ANSITerminal.git" 8 | bug-reports: "https://github.com/Chris00/ANSITerminal/issues" 9 | doc: "https://Chris00.github.io/ANSITerminal/doc" 10 | tags: [ "terminal" ] 11 | build: [ 12 | ["dune" "subst"] {pinned} 13 | ["dune" "build" "-p" name "-j" jobs] 14 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 15 | ] 16 | depends: [ 17 | "ocaml" 18 | "dune" 19 | "base-bytes" 20 | "base-unix" 21 | ] 22 | synopsis: "Basic control of ANSI compliant terminals and the windows shell" 23 | description: """ 24 | ANSITerminal is a module allowing to use the colors and cursor 25 | movements on ANSI terminals. It also works on the windows shell (but 26 | this part is currently work in progress).""" 27 | url { 28 | src: 29 | "https://github.com/Chris00/ANSITerminal/releases/download/0.8.1/ANSITerminal-0.8.1.tbz" 30 | checksum: "md5=d9909496b5e47c75227453256198d1ae" 31 | } 32 | -------------------------------------------------------------------------------- /esy.lock/opam/base-bytes.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: " " 3 | authors: " " 4 | homepage: " " 5 | depends: [ 6 | "ocaml" {>= "4.02.0"} 7 | "ocamlfind" {>= "1.5.3"} 8 | ] 9 | synopsis: "Bytes library distributed with the OCaml compiler" 10 | -------------------------------------------------------------------------------- /esy.lock/opam/base-threads.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Threads library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /esy.lock/opam/base-unix.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Unix library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /esy.lock/opam/conf-m4.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "tim@gfxmonk.net" 3 | homepage: "http://www.gnu.org/software/m4/m4.html" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | authors: "GNU Project" 6 | license: "GPL-3.0-only" 7 | build: [["sh" "-exc" "echo | m4"]] 8 | depexts: [ 9 | ["m4"] {os-family = "debian"} 10 | ["m4"] {os-distribution = "fedora"} 11 | ["m4"] {os-distribution = "rhel"} 12 | ["m4"] {os-distribution = "centos"} 13 | ["m4"] {os-distribution = "alpine"} 14 | ["m4"] {os-distribution = "nixos"} 15 | ["m4"] {os-family = "suse"} 16 | ["m4"] {os-distribution = "ol"} 17 | ["m4"] {os-distribution = "arch"} 18 | ] 19 | synopsis: "Virtual package relying on m4" 20 | description: 21 | "This package can only install if the m4 binary is installed on the system." 22 | flags: conf 23 | -------------------------------------------------------------------------------- /esy.lock/opam/menhir.20200211/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "francois.pottier@inria.fr" 3 | authors: [ 4 | "François Pottier " 5 | "Yann Régis-Gianas " 6 | ] 7 | homepage: "http://gitlab.inria.fr/fpottier/menhir" 8 | dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" 9 | bug-reports: "menhir@inria.fr" 10 | build: [ 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ] 13 | depends: [ 14 | "ocaml" {>= "4.02.3"} 15 | "dune" {>= "2.2.0"} 16 | "menhirLib" {= version} 17 | "menhirSdk" {= version} 18 | ] 19 | synopsis: "An LR(1) parser generator" 20 | url { 21 | src: 22 | "https://gitlab.inria.fr/fpottier/menhir/repository/20200211/archive.tar.gz" 23 | checksum: [ 24 | "md5=01577e5f15380c35bdaa8fd818204560" 25 | "sha512=a686c4b047d5236c425afcd7f179964191268ff448b8d18510579d742a7256855049bc4fe568bb8f1b0d6cbfb758d95cd05e621e3410b75245bb799d623725d6" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/opam/menhirLib.20200211/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "francois.pottier@inria.fr" 3 | authors: [ 4 | "François Pottier " 5 | "Yann Régis-Gianas " 6 | ] 7 | homepage: "http://gitlab.inria.fr/fpottier/menhir" 8 | dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" 9 | bug-reports: "menhir@inria.fr" 10 | build: [ 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ] 13 | depends: [ 14 | "ocaml" {>= "4.02.3"} 15 | "dune" {>= "2.0.0"} 16 | ] 17 | synopsis: "Runtime support library for parsers generated by Menhir" 18 | url { 19 | src: 20 | "https://gitlab.inria.fr/fpottier/menhir/repository/20200211/archive.tar.gz" 21 | checksum: [ 22 | "md5=01577e5f15380c35bdaa8fd818204560" 23 | "sha512=a686c4b047d5236c425afcd7f179964191268ff448b8d18510579d742a7256855049bc4fe568bb8f1b0d6cbfb758d95cd05e621e3410b75245bb799d623725d6" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /esy.lock/opam/menhirSdk.20200211/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "francois.pottier@inria.fr" 3 | authors: [ 4 | "François Pottier " 5 | "Yann Régis-Gianas " 6 | ] 7 | homepage: "http://gitlab.inria.fr/fpottier/menhir" 8 | dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" 9 | bug-reports: "menhir@inria.fr" 10 | build: [ 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ] 13 | depends: [ 14 | "ocaml" {>= "4.02.3"} 15 | "dune" {>= "2.0.0"} 16 | ] 17 | synopsis: "Compile-time library for auxiliary tools related to Menhir" 18 | url { 19 | src: 20 | "https://gitlab.inria.fr/fpottier/menhir/repository/20200211/archive.tar.gz" 21 | checksum: [ 22 | "md5=01577e5f15380c35bdaa8fd818204560" 23 | "sha512=a686c4b047d5236c425afcd7f179964191268ff448b8d18510579d742a7256855049bc4fe568bb8f1b0d6cbfb758d95cd05e621e3410b75245bb799d623725d6" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /esy.lock/opam/merlin-extend.0.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Frederic Bour " 3 | authors: "Frederic Bour " 4 | homepage: "https://github.com/let-def/merlin-extend" 5 | bug-reports: "https://github.com/let-def/merlin-extend" 6 | license: "MIT" 7 | dev-repo: "git+https://github.com/let-def/merlin-extend.git" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "dune" {>= "1.0"} 14 | "cppo" {build} 15 | "ocaml" {>= "4.02.3"} 16 | ] 17 | synopsis: "A protocol to provide custom frontend to Merlin" 18 | description: """ 19 | This protocol allows to replace the OCaml frontend of Merlin. 20 | It extends what used to be done with the `-pp' flag to handle a few more cases.""" 21 | doc: "https://let-def.github.io/merlin-extend" 22 | url { 23 | src: 24 | "https://github.com/let-def/merlin-extend/releases/download/v0.5/merlin-extend-v0.5.tbz" 25 | checksum: [ 26 | "sha256=ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227" 27 | "sha512=55c5a3637337abb8ca8db679128a81ca8ccce567bc214d55b2e6444dc0e905b74c64d629bdea2457d0fe4be5306414feefcdbc4d4761fdafd59aa107550936b6" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /esy.lock/opam/ocaml-compiler-libs.v0.12.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/ocaml-compiler-libs" 5 | bug-reports: "https://github.com/janestreet/ocaml-compiler-libs/issues" 6 | dev-repo: "git+https://github.com/janestreet/ocaml-compiler-libs.git" 7 | license: "Apache-2.0" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" {>= "4.04.1"} 13 | "dune" {>= "1.5.1"} 14 | ] 15 | synopsis: "OCaml compiler libraries repackaged" 16 | description: """ 17 | This packages exposes the OCaml compiler libraries repackages under 18 | the toplevel names Ocaml_common, Ocaml_bytecomp, Ocaml_optcomp, ...""" 19 | url { 20 | src: 21 | "https://github.com/janestreet/ocaml-compiler-libs/archive/v0.12.1.tar.gz" 22 | checksum: "md5=2f929af7c764a3f681a5671f271210c4" 23 | } 24 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BINDIR=$(dirname "$(command -v ocamlc)") 4 | "$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" 5 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install: -------------------------------------------------------------------------------- 1 | bin: [ 2 | "src/findlib/ocamlfind" {"ocamlfind"} 3 | "?src/findlib/ocamlfind_opt" {"ocamlfind"} 4 | "?tools/safe_camlp4" 5 | ] 6 | toplevel: ["src/findlib/topfind"] 7 | -------------------------------------------------------------------------------- /esy.lock/opam/ppx_derivers.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | license: "BSD-3-Clause" 5 | homepage: "https://github.com/ocaml-ppx/ppx_derivers" 6 | bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" 7 | dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" 13 | "dune" 14 | ] 15 | synopsis: "Shared [@@deriving] plugin registry" 16 | description: """ 17 | Ppx_derivers is a tiny package whose sole purpose is to allow 18 | ppx_deriving and ppx_type_conv to inter-operate gracefully when linked 19 | as part of the same ocaml-migrate-parsetree driver.""" 20 | url { 21 | src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz" 22 | checksum: "md5=5dc2bf130c1db3c731fe0fffc5648b41" 23 | } 24 | -------------------------------------------------------------------------------- /esy.lock/opam/ppx_tools_versioned.5.2.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "frederic.bour@lakaban.net" 3 | authors: [ 4 | "Frédéric Bour " 5 | "Alain Frisch " 6 | ] 7 | license: "MIT" 8 | homepage: "https://github.com/ocaml-ppx/ppx_tools_versioned" 9 | bug-reports: "https://github.com/ocaml-ppx/ppx_tools_versioned/issues" 10 | dev-repo: "git://github.com/ocaml-ppx/ppx_tools_versioned.git" 11 | tags: [ "syntax" ] 12 | build: [ 13 | ["dune" "subst"] {pinned} 14 | ["dune" "build" "-p" name "-j" jobs] 15 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 16 | ] 17 | depends: [ 18 | "ocaml" {>= "4.02.0"} 19 | "dune" {>= "1.0"} 20 | "ocaml-migrate-parsetree" {>= "1.4.0"} 21 | ] 22 | synopsis: "A variant of ppx_tools based on ocaml-migrate-parsetree" 23 | url { 24 | src: 25 | "https://github.com/ocaml-ppx/ppx_tools_versioned/archive/5.2.3.tar.gz" 26 | checksum: [ 27 | "md5=b1455e5a4a1bcd9ddbfcf712ccbd4262" 28 | "sha512=af20aa0031b9c638537bcdb52c75de95f316ae8fd455a38672a60da5c7c6895cca9dbecd5d56a88c3c40979c6a673a047d986b5b41e1e84b528b7df5d905b9b1" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /esy.lock/opam/reason.3.5.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Jordan Walke " 3 | authors: [ "Jordan Walke " ] 4 | license: "MIT" 5 | homepage: "https://github.com/facebook/reason" 6 | doc: "http://reasonml.github.io/" 7 | bug-reports: "https://github.com/facebook/reason/issues" 8 | dev-repo: "git://github.com/facebook/reason.git" 9 | tags: [ "syntax" ] 10 | build: [ 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" {>= "4.02" & < "4.10"} 16 | "dune" {>= "1.4"} 17 | "ocamlfind" {build} 18 | "menhir" {>= "20170418"} 19 | "merlin-extend" {>= "0.4"} 20 | "result" 21 | "ocaml-migrate-parsetree" 22 | ] 23 | synopsis: "Reason: Syntax & Toolchain for OCaml" 24 | description: """ 25 | Reason gives OCaml a new syntax that is remniscient of languages like 26 | JavaScript. It's also the umbrella project for a set of tools for the OCaml & 27 | JavaScript ecosystem.""" 28 | url { 29 | src: "https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.5.2.tgz" 30 | checksum: "md5=66c54296009e0f6cbc8e93aa01105cbb" 31 | } 32 | -------------------------------------------------------------------------------- /esy.lock/opam/result.1.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/result" 5 | dev-repo: "git+https://github.com/janestreet/result.git" 6 | bug-reports: "https://github.com/janestreet/result/issues" 7 | license: "BSD-3-Clause" 8 | build: [["dune" "build" "-p" name "-j" jobs]] 9 | depends: [ 10 | "ocaml" 11 | "dune" {>= "1.0"} 12 | ] 13 | synopsis: "Compatibility Result module" 14 | description: """ 15 | Projects that want to use the new result type defined in OCaml >= 4.03 16 | while staying compatible with older version of OCaml should use the 17 | Result module defined in this library.""" 18 | url { 19 | src: 20 | "https://github.com/janestreet/result/releases/download/1.5/result-1.5.tbz" 21 | checksum: "md5=1b82dec78849680b49ae9a8a365b831b" 22 | } 23 | -------------------------------------------------------------------------------- /esy.lock/opam/seq.base/files/META.seq: -------------------------------------------------------------------------------- 1 | name="seq" 2 | version="[distributed with OCaml 4.07 or above]" 3 | description="dummy backward-compatibility package for iterators" 4 | requires="" 5 | -------------------------------------------------------------------------------- /esy.lock/opam/seq.base/files/seq.install: -------------------------------------------------------------------------------- 1 | lib:[ 2 | "META.seq" {"META"} 3 | ] 4 | -------------------------------------------------------------------------------- /esy.lock/opam/seq.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: " " 3 | authors: " " 4 | homepage: " " 5 | depends: [ 6 | "ocaml" {>= "4.07.0"} 7 | ] 8 | dev-repo: "git+https://github.com/ocaml/ocaml.git" 9 | bug-reports: "https://caml.inria.fr/mantis/main_page.php" 10 | synopsis: 11 | "Compatibility package for OCaml's standard iterator type starting from 4.07." 12 | extra-files: [ 13 | ["seq.install" "md5=026b31e1df290373198373d5aaa26e42"] 14 | ["META.seq" "md5=b33c8a1a6c7ed797816ce27df4855107"] 15 | ] 16 | -------------------------------------------------------------------------------- /esy.lock/opam/sexplib0.v0.13.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/sexplib0" 5 | bug-reports: "https://github.com/janestreet/sexplib0/issues" 6 | dev-repo: "git+https://github.com/janestreet/sexplib0.git" 7 | doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/sexplib0/index.html" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.04.2"} 14 | "dune" {>= "1.5.1"} 15 | ] 16 | synopsis: "Library containing the definition of S-expressions and some base converters" 17 | description: " 18 | Part of Jane Street's Core library 19 | The Core suite of libraries is an industrial strength alternative to 20 | OCaml's standard library that was developed by Jane Street, the 21 | largest industrial user of OCaml. 22 | " 23 | url { 24 | src: "https://ocaml.janestreet.com/ocaml-core/v0.13/files/sexplib0-v0.13.0.tar.gz" 25 | checksum: "md5=f8a715dffda5599cfae0cb4031d57abe" 26 | } 27 | -------------------------------------------------------------------------------- /esy.lock/opam/stdio.v0.13.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/stdio" 5 | bug-reports: "https://github.com/janestreet/stdio/issues" 6 | dev-repo: "git+https://github.com/janestreet/stdio.git" 7 | doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/stdio/index.html" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.04.2"} 14 | "base" {>= "v0.13" & < "v0.14"} 15 | "dune" {>= "1.5.1"} 16 | ] 17 | synopsis: "Standard IO library for OCaml" 18 | description: " 19 | Stdio implements simple input/output functionalities for OCaml. 20 | 21 | It re-exports the input/output functions of the OCaml standard 22 | libraries using a more consistent API. 23 | " 24 | url { 25 | src: "https://ocaml.janestreet.com/ocaml-core/v0.13/files/stdio-v0.13.0.tar.gz" 26 | checksum: "md5=48ef28512ddd51ff9885649dd1fab91d" 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/opam/stdlib-shims.0.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "The stdlib-shims programmers" 3 | authors: "The stdlib-shims programmers" 4 | homepage: "https://github.com/ocaml/stdlib-shims" 5 | doc: "https://ocaml.github.io/stdlib-shims/" 6 | dev-repo: "git+https://github.com/ocaml/stdlib-shims.git" 7 | bug-reports: "https://github.com/ocaml/stdlib-shims/issues" 8 | tags: ["stdlib" "compatibility" "org:ocaml"] 9 | license: ["typeof OCaml system"] 10 | depends: [ 11 | "dune" 12 | "ocaml" {>= "4.02.3"} 13 | ] 14 | build: [ "dune" "build" "-p" name "-j" jobs ] 15 | synopsis: "Backport some of the new stdlib features to older compiler" 16 | description: """ 17 | Backport some of the new stdlib features to older compiler, 18 | such as the Stdlib module. 19 | 20 | This allows projects that require compatibility with older compiler to 21 | use these new features in their code. 22 | """ 23 | url { 24 | src: 25 | "https://github.com/ocaml/stdlib-shims/releases/download/0.1.0/stdlib-shims-0.1.0.tbz" 26 | checksum: "md5=12b5704eed70c6bff5ac39a16db1425d" 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/opam/stringext.1.6.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "rudi.grinberg@gmail.com" 3 | authors: "Rudi Grinberg" 4 | license: "MIT" 5 | homepage: "https://github.com/rgrinberg/stringext" 6 | bug-reports: "https://github.com/rgrinberg/stringext/issues" 7 | depends: [ 8 | "ocaml" {>= "4.02.3"} 9 | "dune" {>= "1.0"} 10 | "ounit" {with-test} 11 | "qtest" {with-test & >= "2.2"} 12 | "base-bytes" 13 | ] 14 | build: [ 15 | ["dune" "subst"] {pinned} 16 | ["dune" "build" "-p" name "-j" jobs] 17 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 18 | ] 19 | dev-repo: "git+https://github.com/rgrinberg/stringext.git" 20 | synopsis: "Extra string functions for OCaml" 21 | description: """ 22 | Extra string functions for OCaml. Mainly splitting. All functions are in the 23 | Stringext module. 24 | """ 25 | url { 26 | src: 27 | "https://github.com/rgrinberg/stringext/releases/download/1.6.0/stringext-1.6.0.tbz" 28 | checksum: [ 29 | "sha256=db41f5d52e9eab17615f110b899dfeb27dd7e7f89cd35ae43827c5119db206ea" 30 | "sha512=d8ebe40f42b598a9bd99f1ef4b00ba93458385a4accd121af66a0bf3b3f8d7135f576740adf1a43081dd409977c2219fd4bdbb5b3d1308890d301d553ed49900" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}" 7 | ], 8 | [ 9 | "make", 10 | "-f", 11 | "configure.make", 12 | "all", 13 | "OCAMLBUILD_PREFIX=#{self.install}", 14 | "OCAMLBUILD_BINDIR=#{self.bin}", 15 | "OCAMLBUILD_LIBDIR=#{self.lib}", 16 | "OCAMLBUILD_MANDIR=#{self.man}", 17 | "OCAMLBUILD_NATIVE=true", 18 | "OCAMLBUILD_NATIVE_TOOLS=true" 19 | ], 20 | [ 21 | "make", 22 | "check-if-preinstalled", 23 | "all", 24 | "#{os == 'windows' ? 'install' : 'opam-install'}" 25 | ] 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < findlib-1.8.1.patch' : 'true'}" 7 | ], 8 | [ 9 | "./configure", 10 | "-bindir", 11 | "#{self.bin}", 12 | "-sitelib", 13 | "#{self.lib}", 14 | "-mandir", 15 | "#{self.man}", 16 | "-config", 17 | "#{self.lib}/findlib.conf", 18 | "-no-custom", 19 | "-no-topfind" 20 | ], 21 | [ 22 | "make", 23 | "all" 24 | ], 25 | [ 26 | "make", 27 | "opt" 28 | ] 29 | ], 30 | "install": [ 31 | [ 32 | "make", 33 | "install" 34 | ], 35 | [ 36 | "install", 37 | "-m", 38 | "0755", 39 | "ocaml-stub", 40 | "#{self.bin}/ocaml" 41 | ], 42 | [ 43 | "mkdir", 44 | "-p", 45 | "#{self.toplevel}" 46 | ], 47 | [ 48 | "install", 49 | "-m", 50 | "0644", 51 | "src/findlib/topfind", 52 | "#{self.toplevel}/topfind" 53 | ] 54 | ], 55 | "exportedEnv": { 56 | "OCAML_TOPLEVEL_PATH": { 57 | "val": "#{self.toplevel}", 58 | "scope": "global" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /examples/bs-3.1.5/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "reason_language_server.location": "../../lib/bs/native/bin.native" 3 | } -------------------------------------------------------------------------------- /examples/bs-3.1.5/bsconfig.json: -------------------------------------------------------------------------------- 1 | /* This is the BuckleScript configuration file. Note that this is a comment; 2 | BuckleScript comes with a JSON parser that supports comments and trailing 3 | comma. If this screws with your editor highlighting, please tell us by filing 4 | an issue! */ 5 | { 6 | "name": "react-template", 7 | "reason": { 8 | "react-jsx": 2 9 | }, 10 | "sources": { 11 | "dir" : "src", 12 | "subdirs" : true 13 | }, 14 | "package-specs": [{ 15 | "module": "commonjs", 16 | "in-source": true 17 | }], 18 | "suffix": ".bs.js", 19 | "namespace": true, 20 | "bs-dependencies": [ 21 | "reason-react" 22 | ], 23 | "refmt": 3 24 | } 25 | -------------------------------------------------------------------------------- /examples/bs-3.1.5/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-template", 3 | "version": "0.1.0", 4 | "scripts": { 5 | "build": "bsb -make-world", 6 | "start": "bsb -make-world -w", 7 | "clean": "bsb -clean-world", 8 | "test": "echo \"Error: no test specified\" && exit 1", 9 | "webpack": "webpack -w", 10 | "webpack:production": "NODE_ENV=production webpack" 11 | }, 12 | "keywords": [ 13 | "BuckleScript" 14 | ], 15 | "author": "", 16 | "license": "MIT", 17 | "dependencies": { 18 | "react": "^16.2.0", 19 | "react-dom": "^16.2.0", 20 | "reason-react": ">=0.4.0" 21 | }, 22 | "devDependencies": { 23 | "bs-platform": "3.1.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /examples/bs-3.1.5/src/Component1.re: -------------------------------------------------------------------------------- 1 | /* This is the basic component. */ 2 | let component = ReasonReact.statelessComponent("Page"); 3 | 4 | /* Your familiar handleClick from ReactJS. This mandatorily takes the payload, 5 | then the `self` record, which contains state (none here), `handle`, `reduce` 6 | and other utilities */ 7 | let handleClick = (_event, _self) => Js.log("clicked!"); 8 | /* let x = () => */ 9 | 10 | /* `make` is the function that mandatorily takes `children` (if you want to use 11 | `JSX). `message` is a named argument, which simulates ReactJS props. Usage: 12 | 13 | `` 14 | 15 | Which desugars to 16 | 17 | `ReasonReact.element(Page.make(~message="hello", [||]))` */ 18 | let make = (~message, _children) => { 19 | ...component, 20 | render: self => 21 |
22 | (ReasonReact.string(message)) 23 |
, 24 | }; -------------------------------------------------------------------------------- /examples/bs-3.1.5/src/Index.bs.js: -------------------------------------------------------------------------------- 1 | // Generated by BUCKLESCRIPT VERSION 3.1.5, PLEASE EDIT WITH CARE 2 | 'use strict'; 3 | 4 | var ReactDOMRe = require("reason-react/src/ReactDOMRe.js"); 5 | var ReasonReact = require("reason-react/src/ReasonReact.js"); 6 | var Component1$ReactTemplate = require("./Component1.bs.js"); 7 | var Component2$ReactTemplate = require("./Component2.bs.js"); 8 | 9 | ReactDOMRe.renderToElementWithId(ReasonReact.element(/* None */0, /* None */0, Component1$ReactTemplate.make("Hello!", /* array */[])), "index1"); 10 | 11 | ReactDOMRe.renderToElementWithId(ReasonReact.element(/* None */0, /* None */0, Component2$ReactTemplate.make("Hello!", /* array */[])), "index2"); 12 | 13 | /* Not a pure module */ 14 | -------------------------------------------------------------------------------- /examples/bs-3.1.5/src/Index.re: -------------------------------------------------------------------------------- 1 | ReactDOMRe.renderToElementWithId(, "index1"); 2 | 3 | ReactDOMRe.renderToElementWithId(, "index2"); -------------------------------------------------------------------------------- /examples/bs-3.1.5/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ReasonReact Examples 6 | 7 | 8 | Component 1: 9 |
10 | Component 2: 11 |
12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/bs-7.2/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "reason_language_server.location": "../../lib/bs/native/bin.native" 3 | } -------------------------------------------------------------------------------- /examples/bs-7.2/bsconfig.json: -------------------------------------------------------------------------------- 1 | /* This is the BuckleScript configuration file. Note that this is a comment; 2 | BuckleScript comes with a JSON parser that supports comments and trailing 3 | comma. If this screws with your editor highlighting, please tell us by filing 4 | an issue! */ 5 | { 6 | "name": "react-template", 7 | "reason": { 8 | "react-jsx": 2 9 | }, 10 | "sources": { 11 | "dir" : "src", 12 | "subdirs" : true 13 | }, 14 | "package-specs": [{ 15 | "module": "commonjs", 16 | "in-source": true 17 | }], 18 | "suffix": ".bs.js", 19 | "namespace": true, 20 | "bs-dependencies": [ 21 | "reason-react" 22 | ], 23 | "refmt": 3 24 | } 25 | -------------------------------------------------------------------------------- /examples/bs-7.2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-template", 3 | "version": "0.1.0", 4 | "scripts": { 5 | "build": "bsb -make-world", 6 | "start": "bsb -make-world -w", 7 | "clean": "bsb -clean-world", 8 | "test": "echo \"Error: no test specified\" && exit 1", 9 | "webpack": "webpack -w", 10 | "webpack:production": "NODE_ENV=production webpack" 11 | }, 12 | "keywords": [ 13 | "BuckleScript" 14 | ], 15 | "author": "", 16 | "license": "MIT", 17 | "dependencies": { 18 | "react": "^16.2.0", 19 | "react-dom": "^16.2.0", 20 | "reason-react": ">=0.4.0" 21 | }, 22 | "devDependencies": { 23 | "bs-platform": "7.2.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /examples/bs-7.2/src/Component1.re: -------------------------------------------------------------------------------- 1 | /* This is the basic component. */ 2 | let component = ReasonReact.statelessComponent("Page"); 3 | 4 | /* Your familiar handleClick from ReactJS. This mandatorily takes the payload, 5 | then the `self` record, which contains state (none here), `handle`, `reduce` 6 | and other utilities */ 7 | let handleClick = (_event, _self) => Js.log("clicked!"); 8 | /* let x = () => */ 9 | 10 | /* `make` is the function that mandatorily takes `children` (if you want to use 11 | `JSX). `message` is a named argument, which simulates ReactJS props. Usage: 12 | 13 | `` 14 | 15 | Which desugars to 16 | 17 | `ReasonReact.element(Page.make(~message="hello", [||]))` */ 18 | let make = (~message, _children) => { 19 | ...component, 20 | render: self => 21 |
22 | (ReasonReact.string(message)) 23 |
, 24 | }; -------------------------------------------------------------------------------- /examples/bs-7.2/src/Index.bs.js: -------------------------------------------------------------------------------- 1 | // Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE 2 | 'use strict'; 3 | 4 | var ReactDOMRe = require("reason-react/src/ReactDOMRe.js"); 5 | var ReasonReact = require("reason-react/src/ReasonReact.js"); 6 | var Component1$ReactTemplate = require("./Component1.bs.js"); 7 | var Component2$ReactTemplate = require("./Component2.bs.js"); 8 | 9 | ReactDOMRe.renderToElementWithId(ReasonReact.element(undefined, undefined, Component1$ReactTemplate.make("Hello!", [])), "index1"); 10 | 11 | ReactDOMRe.renderToElementWithId(ReasonReact.element(undefined, undefined, Component2$ReactTemplate.make("Hello!", [])), "index2"); 12 | 13 | /* Not a pure module */ 14 | -------------------------------------------------------------------------------- /examples/bs-7.2/src/Index.re: -------------------------------------------------------------------------------- 1 | ReactDOMRe.renderToElementWithId(, "index1"); 2 | 3 | ReactDOMRe.renderToElementWithId(, "index2"); -------------------------------------------------------------------------------- /examples/bs-7.2/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ReasonReact Examples 6 | 7 | 8 | Component 1: 9 |
10 | Component 2: 11 |
12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/dune-4.07/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "reason_language_server.location": "../../bin.exe" 3 | } -------------------------------------------------------------------------------- /examples/dune-4.07/both/A.re: -------------------------------------------------------------------------------- 1 | let x = 1 2 | let b = B.x 3 | print_endline(string_of_int(b)) -------------------------------------------------------------------------------- /examples/dune-4.07/both/B.re: -------------------------------------------------------------------------------- 1 | let x = 1 2 | -------------------------------------------------------------------------------- /examples/dune-4.07/both/dune: -------------------------------------------------------------------------------- 1 | (executable (public_name A) (name A)) 2 | -------------------------------------------------------------------------------- /examples/dune-4.07/dune-example.opam: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/examples/dune-4.07/dune-example.opam -------------------------------------------------------------------------------- /examples/dune-4.07/dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.8) 2 | (name dune-example) 3 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dune-example", 3 | "esy": { 4 | "build": "dune build -p #{self.name}", 5 | "buildsInSource": "_build" 6 | }, 7 | "dependencies": { 8 | "@opam/dune": "*", 9 | "ocaml": "~4.7", 10 | "rex-json": "jaredly/rex-json#esy", 11 | "@esy-ocaml/reason": "*" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 | * text eol=lf 4 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 | !* 4 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/opam/base-threads.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Threads library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/opam/base-unix.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Unix library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/opam/conf-m4.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "tim@gfxmonk.net" 3 | homepage: "http://www.gnu.org/software/m4/m4.html" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | authors: "GNU Project" 6 | license: "GPL-3.0-only" 7 | build: [["sh" "-exc" "echo | m4"]] 8 | depexts: [ 9 | ["m4"] {os-family = "debian"} 10 | ["m4"] {os-distribution = "fedora"} 11 | ["m4"] {os-distribution = "rhel"} 12 | ["m4"] {os-distribution = "centos"} 13 | ["m4"] {os-distribution = "alpine"} 14 | ["m4"] {os-distribution = "nixos"} 15 | ["m4"] {os-family = "suse"} 16 | ["m4"] {os-distribution = "ol"} 17 | ["m4"] {os-distribution = "arch"} 18 | ] 19 | synopsis: "Virtual package relying on m4" 20 | description: 21 | "This package can only install if the m4 binary is installed on the system." 22 | flags: conf 23 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/opam/menhir.20190924/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "francois.pottier@inria.fr" 3 | authors: [ 4 | "François Pottier " 5 | "Yann Régis-Gianas " 6 | ] 7 | homepage: "http://gitlab.inria.fr/fpottier/menhir" 8 | dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" 9 | bug-reports: "menhir@inria.fr" 10 | build: [ 11 | [make "-f" "Makefile" "PREFIX=%{prefix}%" "USE_OCAMLFIND=true" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 12 | ] 13 | install: [ 14 | [make "-f" "Makefile" "install" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 15 | ] 16 | depends: [ 17 | "ocaml" {>= "4.02"} 18 | "ocamlfind" {build} 19 | "ocamlbuild" {build} 20 | ] 21 | synopsis: "An LR(1) parser generator" 22 | url { 23 | src: 24 | "https://gitlab.inria.fr/fpottier/menhir/repository/20190924/archive.tar.gz" 25 | checksum: [ 26 | "md5=677f1997fb73177d5a00fa1b8d61c3ef" 27 | "sha512=ea8a9a6d773529cf6ac05e4c6c4532770fbb8e574c9b646efcefe90d9f24544741e3e8cfd94c8afea0447e34059a8c79c2829b46764ce3a3d6dcb3e7f75980fc" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/opam/merlin-extend.0.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Frederic Bour " 3 | authors: "Frederic Bour " 4 | homepage: "https://github.com/let-def/merlin-extend" 5 | bug-reports: "https://github.com/let-def/merlin-extend" 6 | license: "MIT" 7 | dev-repo: "git+https://github.com/let-def/merlin-extend.git" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "dune" {>= "1.0"} 14 | "cppo" {build} 15 | "ocaml" {>= "4.02.3"} 16 | ] 17 | synopsis: "A protocol to provide custom frontend to Merlin" 18 | description: """ 19 | This protocol allows to replace the OCaml frontend of Merlin. 20 | It extends what used to be done with the `-pp' flag to handle a few more cases.""" 21 | doc: "https://let-def.github.io/merlin-extend" 22 | url { 23 | src: 24 | "https://github.com/let-def/merlin-extend/releases/download/v0.5/merlin-extend-v0.5.tbz" 25 | checksum: [ 26 | "sha256=ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227" 27 | "sha512=55c5a3637337abb8ca8db679128a81ca8ccce567bc214d55b2e6444dc0e905b74c64d629bdea2457d0fe4be5306414feefcdbc4d4761fdafd59aa107550936b6" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BINDIR=$(dirname "$(command -v ocamlc)") 4 | "$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" 5 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install: -------------------------------------------------------------------------------- 1 | bin: [ 2 | "src/findlib/ocamlfind" {"ocamlfind"} 3 | "?src/findlib/ocamlfind_opt" {"ocamlfind"} 4 | "?tools/safe_camlp4" 5 | ] 6 | toplevel: ["src/findlib/topfind"] 7 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/opam/ppx_derivers.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | license: "BSD-3-Clause" 5 | homepage: "https://github.com/ocaml-ppx/ppx_derivers" 6 | bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" 7 | dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" 13 | "dune" 14 | ] 15 | synopsis: "Shared [@@deriving] plugin registry" 16 | description: """ 17 | Ppx_derivers is a tiny package whose sole purpose is to allow 18 | ppx_deriving and ppx_type_conv to inter-operate gracefully when linked 19 | as part of the same ocaml-migrate-parsetree driver.""" 20 | url { 21 | src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz" 22 | checksum: "md5=5dc2bf130c1db3c731fe0fffc5648b41" 23 | } 24 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/opam/reason.3.5.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Jordan Walke " 3 | authors: [ "Jordan Walke " ] 4 | license: "MIT" 5 | homepage: "https://github.com/facebook/reason" 6 | doc: "http://reasonml.github.io/" 7 | bug-reports: "https://github.com/facebook/reason/issues" 8 | dev-repo: "git://github.com/facebook/reason.git" 9 | tags: [ "syntax" ] 10 | build: [ 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" {>= "4.02" & < "4.10"} 16 | "dune" {>= "1.4"} 17 | "ocamlfind" {build} 18 | "menhir" {>= "20170418"} 19 | "merlin-extend" {>= "0.4"} 20 | "result" 21 | "ocaml-migrate-parsetree" 22 | ] 23 | synopsis: "Reason: Syntax & Toolchain for OCaml" 24 | description: """ 25 | Reason gives OCaml a new syntax that is remniscient of languages like 26 | JavaScript. It's also the umbrella project for a set of tools for the OCaml & 27 | JavaScript ecosystem.""" 28 | url { 29 | src: "https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.5.2.tgz" 30 | checksum: "md5=66c54296009e0f6cbc8e93aa01105cbb" 31 | } 32 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/opam/result.1.4/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/result" 5 | dev-repo: "git+https://github.com/janestreet/result.git" 6 | bug-reports: "https://github.com/janestreet/result/issues" 7 | license: "BSD-3-Clause" 8 | build: [["dune" "build" "-p" name "-j" jobs]] 9 | depends: [ 10 | "ocaml" 11 | "dune" {>= "1.0"} 12 | ] 13 | synopsis: "Compatibility Result module" 14 | description: """ 15 | Projects that want to use the new result type defined in OCaml >= 4.03 16 | while staying compatible with older version of OCaml should use the 17 | Result module defined in this library.""" 18 | url { 19 | src: 20 | "https://github.com/janestreet/result/archive/1.4.tar.gz" 21 | checksum: "md5=d3162dbc501a2af65c8c71e0866541da" 22 | } 23 | -------------------------------------------------------------------------------- /examples/dune-4.07/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}" 7 | ], 8 | [ 9 | "make", 10 | "-f", 11 | "configure.make", 12 | "all", 13 | "OCAMLBUILD_PREFIX=#{self.install}", 14 | "OCAMLBUILD_BINDIR=#{self.bin}", 15 | "OCAMLBUILD_LIBDIR=#{self.lib}", 16 | "OCAMLBUILD_MANDIR=#{self.man}", 17 | "OCAMLBUILD_NATIVE=true", 18 | "OCAMLBUILD_NATIVE_TOOLS=true" 19 | ], 20 | [ 21 | "make", 22 | "check-if-preinstalled", 23 | "all", 24 | "#{os == 'windows' ? 'install' : 'opam-install'}" 25 | ] 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /examples/dune-4.07/src/One.re: -------------------------------------------------------------------------------- 1 | 2 | let x = 10 + Two.y; 3 | print_endline("hello") -------------------------------------------------------------------------------- /examples/dune-4.07/src/Three.re: -------------------------------------------------------------------------------- 1 | let x = 3 2 | -------------------------------------------------------------------------------- /examples/dune-4.07/src/Two.re: -------------------------------------------------------------------------------- 1 | let y = 20 2 | let x = Three.x 3 | -------------------------------------------------------------------------------- /examples/dune-4.07/src/dune: -------------------------------------------------------------------------------- 1 | (library (name One) (public_name dune-example)) 2 | -------------------------------------------------------------------------------- /examples/dune-complex/awesome/dune: -------------------------------------------------------------------------------- 1 | (library (name OnE)) 2 | -------------------------------------------------------------------------------- /examples/dune-complex/both/A.re: -------------------------------------------------------------------------------- 1 | let x = 1 2 | let b = B.x 3 | -------------------------------------------------------------------------------- /examples/dune-complex/both/B.re: -------------------------------------------------------------------------------- 1 | let x = 1 2 | -------------------------------------------------------------------------------- /examples/dune-complex/both/dune: -------------------------------------------------------------------------------- 1 | (executable (public_name A) (name A)) 2 | -------------------------------------------------------------------------------- /examples/dune-complex/dune-complex.opam: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/examples/dune-complex/dune-complex.opam -------------------------------------------------------------------------------- /examples/dune-complex/dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.8) 2 | (name dune-complex) 3 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dune-complex", 3 | "esy": { 4 | "build": "dune build -p #{self.name}", 5 | "buildsInSource": "_build" 6 | }, 7 | "dependencies": { 8 | "@opam/dune": "*", 9 | "rex-json": "jaredly/rex-json#esy", 10 | "@esy-ocaml/reason": "*" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 | * text eol=lf 4 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 | !* 4 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/base-threads.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Threads library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/base-unix.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Unix library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/conf-m4.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "tim@gfxmonk.net" 3 | homepage: "http://www.gnu.org/software/m4/m4.html" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | authors: "GNU Project" 6 | license: "GPL-3" 7 | build: [["sh" "-exc" "echo | m4"]] 8 | depexts: [ 9 | ["m4"] {os-distribution = "debian"} 10 | ["m4"] {os-distribution = "ubuntu"} 11 | ["m4"] {os-distribution = "fedora"} 12 | ["m4"] {os-distribution = "rhel"} 13 | ["m4"] {os-distribution = "centos"} 14 | ["m4"] {os-distribution = "alpine"} 15 | ["m4"] {os-distribution = "nixos"} 16 | ["m4"] {os-family = "suse"} 17 | ["m4"] {os-distribution = "ol"} 18 | ["m4"] {os-distribution = "arch"} 19 | ] 20 | synopsis: "Virtual package relying on m4" 21 | description: 22 | "This package can only install if the m4 binary is installed on the system." 23 | flags: conf 24 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/cppo.1.6.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | homepage: "https://github.com/mjambon/cppo" 5 | dev-repo: "git+https://github.com/mjambon/cppo.git" 6 | bug-reports: "https://github.com/mjambon/cppo/issues" 7 | license: "BSD-3-Clause" 8 | 9 | build: [ 10 | ["jbuilder" "subst" "-p" name] {pinned} 11 | ["jbuilder" "build" "-p" name "-j" jobs] 12 | ["jbuilder" "runtest" "-p" name] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" 16 | "jbuilder" {build & >= "1.0+beta17"} 17 | "base-unix" 18 | ] 19 | synopsis: "Equivalent of the C preprocessor for OCaml programs" 20 | url { 21 | src: "https://github.com/mjambon/cppo/archive/v1.6.5.tar.gz" 22 | checksum: "md5=1cd25741d31417995b0973fe0b6f6c82" 23 | } 24 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/jbuilder.transition/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/ocaml/dune" 5 | bug-reports: "https://github.com/ocaml/dune/issues" 6 | dev-repo: "git+https://github.com/ocaml/dune.git" 7 | license: "MIT" 8 | depends: ["ocaml" "dune"] 9 | post-messages: [ 10 | "Jbuilder has been renamed and the jbuilder package is now a transition \ 11 | package. Use the dune package instead." 12 | ] 13 | synopsis: 14 | "This is a transition package, jbuilder is now named dune. Use the dune" 15 | description: "package instead." 16 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/merlin-extend.0.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Frederic Bour " 3 | authors: "Frederic Bour " 4 | homepage: "https://github.com/let-def/merlin-extend" 5 | bug-reports: "https://github.com/let-def/merlin-extend" 6 | license: "MIT" 7 | dev-repo: "git+https://github.com/let-def/merlin-extend.git" 8 | build: [make] 9 | install: [make "install"] 10 | remove: ["ocamlfind" "remove" "merlin_extend"] 11 | depends: [ 12 | "ocaml" {>= "4.02.3"} 13 | "ocamlfind" {build} 14 | "cppo" {build} 15 | ] 16 | synopsis: "A protocol to provide custom frontend to Merlin" 17 | description: """ 18 | This protocol allows to replace the OCaml frontend of Merlin. 19 | It extends what used to be done with the `-pp' flag to handle a few more cases.""" 20 | flags: light-uninstall 21 | url { 22 | src: "https://github.com/let-def/merlin-extend/archive/v0.3.tar.gz" 23 | checksum: "md5=9c6dfd4f53328f02f12fcc265f4e2dda" 24 | } 25 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/ocamlfind.1.8.0/files/no-awk-check.patch: -------------------------------------------------------------------------------- 1 | commit 40142bc941e6e308686e86be6fc2da92f346a22f 2 | Author: Kate 3 | Date: Tue Mar 19 16:29:06 2019 +0000 4 | 5 | Remove awk from the set of checked unix tools as it's not used anywhere 6 | 7 | diff --git a/configure b/configure 8 | index d9b587c..20e8dca 100755 9 | --- a/configure 10 | +++ b/configure 11 | @@ -184,7 +184,7 @@ echo "Configuring core..." 12 | 13 | # Some standard Unix tools must be available: 14 | 15 | -for tool in sed awk ocaml ocamlc uname rm make cat m4 dirname basename; do 16 | +for tool in sed ocaml ocamlc uname rm make cat m4 dirname basename; do 17 | if in_path $tool; then true; else 18 | echo "configure: $tool not in PATH; this is required" 1>&2 19 | exit 1 20 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/ocamlfind.1.8.0/files/ocaml-stub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BINDIR=$(dirname "$(command -v ocamlc)") 4 | "$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" 5 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/ocamlfind.1.8.0/files/ocamlfind.install: -------------------------------------------------------------------------------- 1 | bin: [ 2 | "src/findlib/ocamlfind" {"ocamlfind"} 3 | "?src/findlib/ocamlfind_opt" {"ocamlfind"} 4 | "?tools/safe_camlp4" 5 | ] 6 | toplevel: ["src/findlib/topfind"] 7 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/ppx_derivers.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | license: "BSD3" 5 | homepage: "https://github.com/ocaml-ppx/ppx_derivers" 6 | bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" 7 | dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" 8 | build: [ 9 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" 13 | "jbuilder" {build & >= "1.0+beta7"} 14 | ] 15 | synopsis: "Shared [@@deriving] plugin registry" 16 | description: """ 17 | Ppx_derivers is a tiny package whose sole purpose is to allow 18 | ppx_deriving and ppx_type_conv to inter-operate gracefully when linked 19 | as part of the same ocaml-migrate-parsetree driver.""" 20 | url { 21 | src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.0.tar.gz" 22 | checksum: "md5=4ddce8f43fdb9b0ef0ab6a7cbfebc3e3" 23 | } 24 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/reason.3.4.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Jordan Walke " 3 | authors: [ "Jordan Walke " ] 4 | license: "MIT" 5 | homepage: "https://github.com/facebook/reason" 6 | doc: "http://reasonml.github.io/" 7 | bug-reports: "https://github.com/facebook/reason/issues" 8 | dev-repo: "git://github.com/facebook/reason.git" 9 | tags: [ "syntax" ] 10 | build: [ 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" {>= "4.02" & < "4.08"} 16 | "dune" {build & >= "1.4"} 17 | "ocamlfind" {build} 18 | "menhir" {>= "20170418"} 19 | "merlin-extend" {>= "0.3"} 20 | "result" 21 | "ocaml-migrate-parsetree" 22 | ] 23 | synopsis: "Reason: Syntax & Toolchain for OCaml" 24 | description: """ 25 | Reason gives OCaml a new syntax that is remniscient of languages like 26 | JavaScript. It's also the umbrella project for a set of tools for the OCaml & 27 | JavaScript ecosystem.""" 28 | url { 29 | src: "https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.4.0.tgz" 30 | checksum: "md5=1b6cba03588e5fba3b5eb693c0d02dea" 31 | } 32 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/opam/result.1.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/result" 5 | dev-repo: "git+https://github.com/janestreet/result.git" 6 | bug-reports: "https://github.com/janestreet/result/issues" 7 | license: "BSD3" 8 | build: [["jbuilder" "build" "-p" name "-j" jobs]] 9 | depends: [ 10 | "ocaml" 11 | "jbuilder" {build & >= "1.0+beta11"} 12 | ] 13 | synopsis: "Compatibility Result module" 14 | description: """ 15 | Projects that want to use the new result type defined in OCaml >= 4.03 16 | while staying compatible with older version of OCaml should use the 17 | Result module defined in this library.""" 18 | url { 19 | src: 20 | "https://github.com/janestreet/result/releases/download/1.3/result-1.3.tbz" 21 | checksum: "md5=4beebefd41f7f899b6eeba7414e7ae01" 22 | } 23 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/overrides/opam__s__dune_opam__c__1.8.2_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "ocaml", 5 | "bootstrap.ml" 6 | ], 7 | [ 8 | "./boot.exe", 9 | "--release", 10 | "-j", 11 | "4" 12 | ] 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < merlin-extend-winfix.patch' : 'true'}" 7 | ], 8 | [ 9 | "make" 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /examples/dune-complex/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}" 7 | ], 8 | [ 9 | "make", 10 | "-f", 11 | "configure.make", 12 | "all", 13 | "OCAMLBUILD_PREFIX=#{self.install}", 14 | "OCAMLBUILD_BINDIR=#{self.bin}", 15 | "OCAMLBUILD_LIBDIR=#{self.lib}", 16 | "OCAMLBUILD_MANDIR=#{self.man}", 17 | "OCAMLBUILD_NATIVE=true", 18 | "OCAMLBUILD_NATIVE_TOOLS=true" 19 | ], 20 | [ 21 | "make", 22 | "check-if-preinstalled", 23 | "all", 24 | "#{os == 'windows' ? 'install' : 'opam-install'}" 25 | ] 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /examples/dune-complex/src/One.re: -------------------------------------------------------------------------------- 1 | let x = 10 2 | -------------------------------------------------------------------------------- /examples/dune-complex/src/Three.re: -------------------------------------------------------------------------------- 1 | let x = 3 2 | -------------------------------------------------------------------------------- /examples/dune-complex/src/Two.re: -------------------------------------------------------------------------------- 1 | let y = 20 2 | let x = Three.x 3 | -------------------------------------------------------------------------------- /examples/dune-complex/src/dune: -------------------------------------------------------------------------------- 1 | (library (name One) (public_name dune-complex.One) (modules One)) 2 | (library (name Two) (public_name dune-complex.Two) (modules Two Three) (libraries One RexJson)) 3 | -------------------------------------------------------------------------------- /examples/dune/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "reason_language_server.location": "../../bin.exe" 3 | } -------------------------------------------------------------------------------- /examples/dune/both/A.re: -------------------------------------------------------------------------------- 1 | let x = 1 2 | let b = B.x 3 | print_endline(string_of_int(b)) -------------------------------------------------------------------------------- /examples/dune/both/B.re: -------------------------------------------------------------------------------- 1 | let x = 1 2 | -------------------------------------------------------------------------------- /examples/dune/both/dune: -------------------------------------------------------------------------------- 1 | (executable (public_name A) (name A)) 2 | -------------------------------------------------------------------------------- /examples/dune/dune-example.opam: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/examples/dune/dune-example.opam -------------------------------------------------------------------------------- /examples/dune/dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.8) 2 | (name dune-example) 3 | -------------------------------------------------------------------------------- /examples/dune/esy.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dune-example", 3 | "esy": { 4 | "build": "dune build -p #{self.name}", 5 | "buildsInSource": "_build" 6 | }, 7 | "dependencies": { 8 | "@opam/dune": "*", 9 | "ocaml": "~4.8", 10 | "rex-json": "jaredly/rex-json#esy", 11 | "@esy-ocaml/reason": "*" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 | * text eol=lf 4 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 | !* 4 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/opam/base-threads.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Threads library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/opam/base-unix.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Unix library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/opam/conf-m4.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "tim@gfxmonk.net" 3 | homepage: "http://www.gnu.org/software/m4/m4.html" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | authors: "GNU Project" 6 | license: "GPL-3.0-only" 7 | build: [["sh" "-exc" "echo | m4"]] 8 | depexts: [ 9 | ["m4"] {os-family = "debian"} 10 | ["m4"] {os-distribution = "fedora"} 11 | ["m4"] {os-distribution = "rhel"} 12 | ["m4"] {os-distribution = "centos"} 13 | ["m4"] {os-distribution = "alpine"} 14 | ["m4"] {os-distribution = "nixos"} 15 | ["m4"] {os-family = "suse"} 16 | ["m4"] {os-distribution = "ol"} 17 | ["m4"] {os-distribution = "arch"} 18 | ] 19 | synopsis: "Virtual package relying on m4" 20 | description: 21 | "This package can only install if the m4 binary is installed on the system." 22 | flags: conf 23 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/opam/menhir.20190924/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "francois.pottier@inria.fr" 3 | authors: [ 4 | "François Pottier " 5 | "Yann Régis-Gianas " 6 | ] 7 | homepage: "http://gitlab.inria.fr/fpottier/menhir" 8 | dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" 9 | bug-reports: "menhir@inria.fr" 10 | build: [ 11 | [make "-f" "Makefile" "PREFIX=%{prefix}%" "USE_OCAMLFIND=true" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 12 | ] 13 | install: [ 14 | [make "-f" "Makefile" "install" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 15 | ] 16 | depends: [ 17 | "ocaml" {>= "4.02"} 18 | "ocamlfind" {build} 19 | "ocamlbuild" {build} 20 | ] 21 | synopsis: "An LR(1) parser generator" 22 | url { 23 | src: 24 | "https://gitlab.inria.fr/fpottier/menhir/repository/20190924/archive.tar.gz" 25 | checksum: [ 26 | "md5=677f1997fb73177d5a00fa1b8d61c3ef" 27 | "sha512=ea8a9a6d773529cf6ac05e4c6c4532770fbb8e574c9b646efcefe90d9f24544741e3e8cfd94c8afea0447e34059a8c79c2829b46764ce3a3d6dcb3e7f75980fc" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/opam/merlin-extend.0.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Frederic Bour " 3 | authors: "Frederic Bour " 4 | homepage: "https://github.com/let-def/merlin-extend" 5 | bug-reports: "https://github.com/let-def/merlin-extend" 6 | license: "MIT" 7 | dev-repo: "git+https://github.com/let-def/merlin-extend.git" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "dune" {>= "1.0"} 14 | "cppo" {build} 15 | "ocaml" {>= "4.02.3"} 16 | ] 17 | synopsis: "A protocol to provide custom frontend to Merlin" 18 | description: """ 19 | This protocol allows to replace the OCaml frontend of Merlin. 20 | It extends what used to be done with the `-pp' flag to handle a few more cases.""" 21 | doc: "https://let-def.github.io/merlin-extend" 22 | url { 23 | src: 24 | "https://github.com/let-def/merlin-extend/releases/download/v0.5/merlin-extend-v0.5.tbz" 25 | checksum: [ 26 | "sha256=ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227" 27 | "sha512=55c5a3637337abb8ca8db679128a81ca8ccce567bc214d55b2e6444dc0e905b74c64d629bdea2457d0fe4be5306414feefcdbc4d4761fdafd59aa107550936b6" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BINDIR=$(dirname "$(command -v ocamlc)") 4 | "$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" 5 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install: -------------------------------------------------------------------------------- 1 | bin: [ 2 | "src/findlib/ocamlfind" {"ocamlfind"} 3 | "?src/findlib/ocamlfind_opt" {"ocamlfind"} 4 | "?tools/safe_camlp4" 5 | ] 6 | toplevel: ["src/findlib/topfind"] 7 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/opam/ppx_derivers.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | license: "BSD-3-Clause" 5 | homepage: "https://github.com/ocaml-ppx/ppx_derivers" 6 | bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" 7 | dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" 13 | "dune" 14 | ] 15 | synopsis: "Shared [@@deriving] plugin registry" 16 | description: """ 17 | Ppx_derivers is a tiny package whose sole purpose is to allow 18 | ppx_deriving and ppx_type_conv to inter-operate gracefully when linked 19 | as part of the same ocaml-migrate-parsetree driver.""" 20 | url { 21 | src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz" 22 | checksum: "md5=5dc2bf130c1db3c731fe0fffc5648b41" 23 | } 24 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/opam/reason.3.5.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Jordan Walke " 3 | authors: [ "Jordan Walke " ] 4 | license: "MIT" 5 | homepage: "https://github.com/facebook/reason" 6 | doc: "http://reasonml.github.io/" 7 | bug-reports: "https://github.com/facebook/reason/issues" 8 | dev-repo: "git://github.com/facebook/reason.git" 9 | tags: [ "syntax" ] 10 | build: [ 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" {>= "4.02" & < "4.10"} 16 | "dune" {>= "1.4"} 17 | "ocamlfind" {build} 18 | "menhir" {>= "20170418"} 19 | "merlin-extend" {>= "0.4"} 20 | "result" 21 | "ocaml-migrate-parsetree" 22 | ] 23 | synopsis: "Reason: Syntax & Toolchain for OCaml" 24 | description: """ 25 | Reason gives OCaml a new syntax that is remniscient of languages like 26 | JavaScript. It's also the umbrella project for a set of tools for the OCaml & 27 | JavaScript ecosystem.""" 28 | url { 29 | src: "https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.5.2.tgz" 30 | checksum: "md5=66c54296009e0f6cbc8e93aa01105cbb" 31 | } 32 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/opam/result.1.4/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/result" 5 | dev-repo: "git+https://github.com/janestreet/result.git" 6 | bug-reports: "https://github.com/janestreet/result/issues" 7 | license: "BSD-3-Clause" 8 | build: [["dune" "build" "-p" name "-j" jobs]] 9 | depends: [ 10 | "ocaml" 11 | "dune" {>= "1.0"} 12 | ] 13 | synopsis: "Compatibility Result module" 14 | description: """ 15 | Projects that want to use the new result type defined in OCaml >= 4.03 16 | while staying compatible with older version of OCaml should use the 17 | Result module defined in this library.""" 18 | url { 19 | src: 20 | "https://github.com/janestreet/result/archive/1.4.tar.gz" 21 | checksum: "md5=d3162dbc501a2af65c8c71e0866541da" 22 | } 23 | -------------------------------------------------------------------------------- /examples/dune/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}" 7 | ], 8 | [ 9 | "make", 10 | "-f", 11 | "configure.make", 12 | "all", 13 | "OCAMLBUILD_PREFIX=#{self.install}", 14 | "OCAMLBUILD_BINDIR=#{self.bin}", 15 | "OCAMLBUILD_LIBDIR=#{self.lib}", 16 | "OCAMLBUILD_MANDIR=#{self.man}", 17 | "OCAMLBUILD_NATIVE=true", 18 | "OCAMLBUILD_NATIVE_TOOLS=true" 19 | ], 20 | [ 21 | "make", 22 | "check-if-preinstalled", 23 | "all", 24 | "#{os == 'windows' ? 'install' : 'opam-install'}" 25 | ] 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /examples/dune/src/One.re: -------------------------------------------------------------------------------- 1 | let x = 10 + Two.y; 2 | print_endline("hello") -------------------------------------------------------------------------------- /examples/dune/src/Three.re: -------------------------------------------------------------------------------- 1 | let x = 3 2 | -------------------------------------------------------------------------------- /examples/dune/src/Two.re: -------------------------------------------------------------------------------- 1 | let y = 20 2 | let x = Three.x 3 | -------------------------------------------------------------------------------- /examples/dune/src/dune: -------------------------------------------------------------------------------- 1 | (library (name One) (public_name dune-example)) 2 | -------------------------------------------------------------------------------- /examples/example-codemod/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeLens": true, 3 | // "reason_language_server.location": "../../lib/bs/native/bin.native", 4 | "reason_language_server.location": "../../_build/install/default/bin/Bin", 5 | // "reason_language_server.location": "../lib/bs/native/bin.native.exe", 6 | "reason_language_server.reloadOnChange": true, 7 | "reason_language_server.per_value_codelens": false, 8 | "reason_language_server.show_debug_errors": true, 9 | //"reason_language_server.show_module_path_on_hover": false 10 | } 11 | -------------------------------------------------------------------------------- /examples/example-codemod/bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tryit", 3 | "sources": "src", 4 | "bsc-flags": ["-bs-super-errors", "-open Belt"], 5 | "warnings": { 6 | "number": "-32-26-27-33" 7 | }, 8 | "namespace": true, 9 | "refmt": 3 10 | } -------------------------------------------------------------------------------- /examples/example-codemod/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "bs-platform": { 6 | "version": "4.0.3", 7 | "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-4.0.3.tgz", 8 | "integrity": "sha1-RRDByRXMWxabVxflwK2lLT+Z/5g=" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/example-codemod/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "bs-platform": "4.0.3" 4 | }, 5 | "scripts": { 6 | "build": "bsb -make-world", 7 | "start": "bsb -make-world -w" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/example-codemod/src/More.re: -------------------------------------------------------------------------------- 1 | /** Toplevel docs */; 2 | 3 | open Result; 4 | 5 | let changeMe = (a, b, c) => Error("hello"); 6 | 7 | let nonCollapsible = something => 8 | if (something > 2) { 9 | Result.Ok(something); 10 | } else { 11 | Error("bad news"); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/example-es6-imports/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeLens": true, 3 | // "reason_language_server.location": "../../lib/bs/native/bin.native", 4 | // "reason_language_server.location": "../lib/bs/native/bin.native.exe", 5 | "reason_language_server.reloadOnChange": true, 6 | "reason_language_server.per_value_codelens": false, 7 | "reason_language_server.show_debug_errors": true, 8 | "editor.parameterHints": true 9 | } -------------------------------------------------------------------------------- /examples/example-es6-imports/bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web", 3 | "reason": { 4 | "react-jsx": 2 5 | }, 6 | "sources": { 7 | "dir": "src", 8 | "subdirs": true 9 | }, 10 | "package-specs": { 11 | "module": "es6", 12 | "in-source": true 13 | }, 14 | "suffix": ".bs.js", 15 | "refmt": 3 16 | } -------------------------------------------------------------------------------- /examples/example-es6-imports/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "bs-platform": { 6 | "version": "4.0.3", 7 | "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-4.0.3.tgz", 8 | "integrity": "sha1-RRDByRXMWxabVxflwK2lLT+Z/5g=" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/example-es6-imports/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "bs-platform": "4.0.3" 4 | }, 5 | "scripts": { 6 | "build": "bsb -make-world", 7 | "start": "bsb -make-world -w" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/example-es6-imports/src/Awesome.rei: -------------------------------------------------------------------------------- 1 | type atype = { 2 | name: int, 3 | age: int, 4 | }; -------------------------------------------------------------------------------- /examples/example-es6-imports/src/More.bs.js: -------------------------------------------------------------------------------- 1 | // Generated by BUCKLESCRIPT VERSION 4.0.3, PLEASE EDIT WITH CARE 2 | 3 | 4 | var contnets = "here"; 5 | 6 | var outer = 20; 7 | 8 | var n = 10; 9 | 10 | var party = 30; 11 | 12 | export { 13 | contnets , 14 | outer , 15 | n , 16 | party , 17 | 18 | } 19 | /* No side effect */ 20 | -------------------------------------------------------------------------------- /examples/example-es6-imports/src/More.re: -------------------------------------------------------------------------------- 1 | /** Toplevel docs */; 2 | 3 | /** Some contents */ 4 | let contnets = "here"; 5 | 6 | let outer = 20; 7 | 8 | let n = 10; 9 | 10 | let party = 30; -------------------------------------------------------------------------------- /examples/example-es6-imports/src/Other.bs.js: -------------------------------------------------------------------------------- 1 | // Generated by BUCKLESCRIPT VERSION 4.0.3, PLEASE EDIT WITH CARE 2 | 3 | import * as Block from "bs-platform/lib/es6/block.js"; 4 | 5 | var z = /* record */[ 6 | /* name */"hi", 7 | /* age */20 8 | ]; 9 | 10 | function concat(first, second) { 11 | return first + second | 0; 12 | } 13 | 14 | var oo = /* record */[ 15 | /* person */z, 16 | /* height */34.2 17 | ]; 18 | 19 | function show() { 20 | return /* () */0; 21 | } 22 | 23 | var something = 10; 24 | 25 | var inner = 10; 26 | 27 | var m = /* Things */Block.__(0, [1]); 28 | 29 | var later = 20; 30 | 31 | export { 32 | something , 33 | inner , 34 | m , 35 | z , 36 | later , 37 | concat , 38 | oo , 39 | show , 40 | 41 | } 42 | /* No side effect */ 43 | -------------------------------------------------------------------------------- /examples/example-es6-imports/src/Other.re: -------------------------------------------------------------------------------- 1 | 2 | /* let later = 10; */ 3 | 4 | /* Ok testing things */ 5 | 6 | let something = 10; 7 | 8 | type person = {name: string, age: int}; 9 | 10 | type animals = Things(int) | People(string) | Mouse; 11 | 12 | let inner = 10; 13 | /* More.outer; */ 14 | 15 | 16 | let m = Things(1); 17 | 18 | /* working on things. */ 19 | 20 | 21 | let z = {name: "hi", age: 20}; 22 | 23 | let later = 20; 24 | 25 | let concat = (~first, ~second) => first + second; 26 | 27 | type other = {person, height: float}; 28 | let oo = {person: z, height: 34.2}; 29 | 30 | let show = o => { 31 | let m = o.height; 32 | }; 33 | -------------------------------------------------------------------------------- /examples/example-es6-imports/src/SomeFile.bs.js: -------------------------------------------------------------------------------- 1 | // Generated by BUCKLESCRIPT VERSION 4.0.3, PLEASE EDIT WITH CARE 2 | 3 | 4 | function m(x, y) { 5 | return x + y | 0; 6 | } 7 | 8 | var x = 10; 9 | 10 | var y = 20; 11 | 12 | export { 13 | x , 14 | y , 15 | m , 16 | 17 | } 18 | /* No side effect */ 19 | -------------------------------------------------------------------------------- /examples/example-es6-imports/src/SomeFile.ml: -------------------------------------------------------------------------------- 1 | let x = 10 2 | 3 | let y = 20 4 | 5 | let m x y = 6 | let z = x + y in 7 | z 8 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeLens": true, 3 | "reason_language_server.location": "../../bin.exe", 4 | // "reason_language_server.location": "../lib/bs/native/bin.native.exe", 5 | "reason_language_server.reloadOnChange": true, 6 | "reason_language_server.per_value_codelens": true, 7 | "reason_language_server.show_debug_errors": true 8 | } 9 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/Readme.md: -------------------------------------------------------------------------------- 1 | # example-esy-dune-project 2 | 3 | ## Building 4 | 5 | This project requires Esy. Install it with: 6 | 7 | ```sh 8 | npm install -g esy@latest 9 | ``` 10 | 11 | Then in the root of the project directory, run: 12 | 13 | ```sh 14 | esy install 15 | esy build 16 | ``` 17 | 18 | You can run an editor in the project environment by prefixing the command with `esy`. 19 | 20 | ```sh 21 | esy $EDITOR 22 | esy vim 23 | esy code . 24 | ``` 25 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/bin/dune: -------------------------------------------------------------------------------- 1 | (executable 2 | (name Hello) 3 | (public_name Hello.exe) 4 | (libraries lib) 5 | ) 6 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.0) 2 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 | * text eol=lf 4 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 | !* 4 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/base-threads.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Threads library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/base-unix.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Unix library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/biniou.1.2.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | 5 | homepage: "https://github.com/mjambon/biniou" 6 | bug-reports: "https://github.com/mjambon/biniou/issues" 7 | dev-repo: "git+https://github.com/mjambon/biniou.git" 8 | license: "BSD-3-Clause" 9 | 10 | build: [ 11 | ["jbuilder" "build" "-p" name "-j" jobs] 12 | ["jbuilder" "runtest" "-p" name] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" {>= "4.02.3"} 16 | "conf-which" {build} 17 | "jbuilder" {build & >= "1.0+beta7"} 18 | "easy-format" 19 | ] 20 | synopsis: 21 | "Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve" 22 | url { 23 | src: "https://github.com/mjambon/biniou/archive/v1.2.0.tar.gz" 24 | checksum: "md5=f3e92358e832ed94eaf23ce622ccc2f9" 25 | } 26 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/conf-m4.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "tim@gfxmonk.net" 3 | homepage: "http://www.gnu.org/software/m4/m4.html" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | authors: "GNU Project" 6 | license: "GPL-3" 7 | build: [["sh" "-exc" "echo | m4"]] 8 | depexts: [ 9 | ["m4"] {os-distribution = "debian"} 10 | ["m4"] {os-distribution = "ubuntu"} 11 | ["m4"] {os-distribution = "fedora"} 12 | ["m4"] {os-distribution = "rhel"} 13 | ["m4"] {os-distribution = "centos"} 14 | ["m4"] {os-distribution = "alpine"} 15 | ["m4"] {os-distribution = "nixos"} 16 | ["m4"] {os-family = "suse"} 17 | ["m4"] {os-distribution = "ol"} 18 | ["m4"] {os-distribution = "arch"} 19 | ] 20 | synopsis: "Virtual package relying on m4" 21 | description: 22 | "This package can only install if the m4 binary is installed on the system." 23 | flags: conf 24 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/conf-which.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "unixjunkie@sdf.org" 3 | homepage: "http://www.gnu.org/software/which/" 4 | authors: "Carlo Wood" 5 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 6 | license: "GPL-2+" 7 | build: [["which" "which"]] 8 | depexts: [ 9 | ["which"] {os-distribution = "centos"} 10 | ["which"] {os-distribution = "fedora"} 11 | ["which"] {os-family = "suse"} 12 | ["debianutils"] {os-distribution = "debian"} 13 | ["debianutils"] {os-distribution = "ubuntu"} 14 | ["which"] {os-distribution = "nixos"} 15 | ["which"] {os-distribution = "arch"} 16 | ] 17 | synopsis: "Virtual package relying on which" 18 | description: 19 | "This package can only install if the which program is installed on the system." 20 | flags: conf 21 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/cppo.1.6.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | homepage: "https://github.com/mjambon/cppo" 5 | dev-repo: "git+https://github.com/mjambon/cppo.git" 6 | bug-reports: "https://github.com/mjambon/cppo/issues" 7 | license: "BSD-3-Clause" 8 | 9 | build: [ 10 | ["jbuilder" "subst" "-p" name] {pinned} 11 | ["jbuilder" "build" "-p" name "-j" jobs] 12 | ["jbuilder" "runtest" "-p" name] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" 16 | "jbuilder" {build & >= "1.0+beta17"} 17 | "base-unix" 18 | ] 19 | synopsis: "Equivalent of the C preprocessor for OCaml programs" 20 | url { 21 | src: "https://github.com/mjambon/cppo/archive/v1.6.5.tar.gz" 22 | checksum: "md5=1cd25741d31417995b0973fe0b6f6c82" 23 | } 24 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/easy-format.1.3.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | homepage: "http://mjambon.com/easy-format.html" 5 | bug-reports: "https://github.com/mjambon/easy-format/issues" 6 | dev-repo: "git+https://github.com/mjambon/easy-format.git" 7 | build: [ 8 | ["jbuilder" "build" "-p" name "-j" jobs] 9 | ["jbuilder" "runtest" "-p" name] {with-test} 10 | ] 11 | depends: [ 12 | "ocaml" {>= "4.02.3"} 13 | "jbuilder" {build} 14 | ] 15 | synopsis: 16 | "High-level and functional interface to the Format module of the OCaml standard library" 17 | url { 18 | src: "https://github.com/mjambon/easy-format/archive/v1.3.1.tar.gz" 19 | checksum: "md5=4e163700fb88fdcd6b8976c3a216c8ea" 20 | } 21 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/jbuilder.transition/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/ocaml/dune" 5 | bug-reports: "https://github.com/ocaml/dune/issues" 6 | dev-repo: "git+https://github.com/ocaml/dune.git" 7 | license: "MIT" 8 | depends: ["ocaml" "dune"] 9 | post-messages: [ 10 | "Jbuilder has been renamed and the jbuilder package is now a transition \ 11 | package. Use the dune package instead." 12 | ] 13 | synopsis: 14 | "This is a transition package, jbuilder is now named dune. Use the dune" 15 | description: "package instead." 16 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/merlin-extend.0.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Frederic Bour " 3 | authors: "Frederic Bour " 4 | homepage: "https://github.com/let-def/merlin-extend" 5 | bug-reports: "https://github.com/let-def/merlin-extend" 6 | license: "MIT" 7 | dev-repo: "git+https://github.com/let-def/merlin-extend.git" 8 | build: [make] 9 | install: [make "install"] 10 | remove: ["ocamlfind" "remove" "merlin_extend"] 11 | depends: [ 12 | "ocaml" {>= "4.02.3"} 13 | "ocamlfind" {build} 14 | "cppo" {build} 15 | ] 16 | synopsis: "A protocol to provide custom frontend to Merlin" 17 | description: """ 18 | This protocol allows to replace the OCaml frontend of Merlin. 19 | It extends what used to be done with the `-pp' flag to handle a few more cases.""" 20 | flags: light-uninstall 21 | url { 22 | src: "https://github.com/let-def/merlin-extend/archive/v0.3.tar.gz" 23 | checksum: "md5=9c6dfd4f53328f02f12fcc265f4e2dda" 24 | } 25 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/ocamlfind.1.8.0/files/no-awk-check.patch: -------------------------------------------------------------------------------- 1 | commit 40142bc941e6e308686e86be6fc2da92f346a22f 2 | Author: Kate 3 | Date: Tue Mar 19 16:29:06 2019 +0000 4 | 5 | Remove awk from the set of checked unix tools as it's not used anywhere 6 | 7 | diff --git a/configure b/configure 8 | index d9b587c..20e8dca 100755 9 | --- a/configure 10 | +++ b/configure 11 | @@ -184,7 +184,7 @@ echo "Configuring core..." 12 | 13 | # Some standard Unix tools must be available: 14 | 15 | -for tool in sed awk ocaml ocamlc uname rm make cat m4 dirname basename; do 16 | +for tool in sed ocaml ocamlc uname rm make cat m4 dirname basename; do 17 | if in_path $tool; then true; else 18 | echo "configure: $tool not in PATH; this is required" 1>&2 19 | exit 1 20 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/ocamlfind.1.8.0/files/ocaml-stub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BINDIR=$(dirname "$(command -v ocamlc)") 4 | "$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" 5 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/ocamlfind.1.8.0/files/ocamlfind.install: -------------------------------------------------------------------------------- 1 | bin: [ 2 | "src/findlib/ocamlfind" {"ocamlfind"} 3 | "?src/findlib/ocamlfind_opt" {"ocamlfind"} 4 | "?tools/safe_camlp4" 5 | ] 6 | toplevel: ["src/findlib/topfind"] 7 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/ppx_derivers.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | license: "BSD3" 5 | homepage: "https://github.com/ocaml-ppx/ppx_derivers" 6 | bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" 7 | dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" 8 | build: [ 9 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" 13 | "jbuilder" {build & >= "1.0+beta7"} 14 | ] 15 | synopsis: "Shared [@@deriving] plugin registry" 16 | description: """ 17 | Ppx_derivers is a tiny package whose sole purpose is to allow 18 | ppx_deriving and ppx_type_conv to inter-operate gracefully when linked 19 | as part of the same ocaml-migrate-parsetree driver.""" 20 | url { 21 | src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.0.tar.gz" 22 | checksum: "md5=4ddce8f43fdb9b0ef0ab6a7cbfebc3e3" 23 | } 24 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/opam/result.1.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/result" 5 | dev-repo: "git+https://github.com/janestreet/result.git" 6 | bug-reports: "https://github.com/janestreet/result/issues" 7 | license: "BSD3" 8 | build: [["jbuilder" "build" "-p" name "-j" jobs]] 9 | depends: [ 10 | "ocaml" 11 | "jbuilder" {build & >= "1.0+beta11"} 12 | ] 13 | synopsis: "Compatibility Result module" 14 | description: """ 15 | Projects that want to use the new result type defined in OCaml >= 4.03 16 | while staying compatible with older version of OCaml should use the 17 | Result module defined in this library.""" 18 | url { 19 | src: 20 | "https://github.com/janestreet/result/releases/download/1.3/result-1.3.tbz" 21 | checksum: "md5=4beebefd41f7f899b6eeba7414e7ae01" 22 | } 23 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/overrides/opam__s__dune_opam__c__1.8.2_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "ocaml", 5 | "bootstrap.ml" 6 | ], 7 | [ 8 | "./boot.exe", 9 | "--release", 10 | "-j", 11 | "4" 12 | ] 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < merlin-extend-winfix.patch' : 'true'}" 7 | ], 8 | [ 9 | "make" 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}" 7 | ], 8 | [ 9 | "make", 10 | "-f", 11 | "configure.make", 12 | "all", 13 | "OCAMLBUILD_PREFIX=#{self.install}", 14 | "OCAMLBUILD_BINDIR=#{self.bin}", 15 | "OCAMLBUILD_LIBDIR=#{self.lib}", 16 | "OCAMLBUILD_MANDIR=#{self.man}", 17 | "OCAMLBUILD_NATIVE=true", 18 | "OCAMLBUILD_NATIVE_TOOLS=true" 19 | ], 20 | [ 21 | "make", 22 | "check-if-preinstalled", 23 | "all", 24 | "#{os == 'windows' ? 'install' : 'opam-install'}" 25 | ] 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/hello.opam: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/examples/example-esy-dune-project/hello.opam -------------------------------------------------------------------------------- /examples/example-esy-dune-project/lib/.merlin: -------------------------------------------------------------------------------- 1 | EXCLUDE_QUERY_DIR 2 | B /Users/jared/clone/tools/reason-language-server/examples/example-esy-dune-project/_esy/default/store/b/hello-bb5af4c3/default/lib/.lib.objs/byte 3 | S . 4 | FLG -open Lib -w -40 5 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/lib/Awesome.rei: -------------------------------------------------------------------------------- 1 | type atype = { 2 | name: int, 3 | age: int, 4 | }; -------------------------------------------------------------------------------- /examples/example-esy-dune-project/lib/More.re: -------------------------------------------------------------------------------- 1 | /** Toplevel docs */; 2 | 3 | /** Some contents */ 4 | let contnets = "here"; 5 | 6 | let x = 10; 7 | 8 | let y = x; 9 | 10 | let inner = 20; 11 | 12 | let n = 10; 13 | 14 | let party = 30; 15 | 16 | let outer = 40; -------------------------------------------------------------------------------- /examples/example-esy-dune-project/lib/Other.re: -------------------------------------------------------------------------------- 1 | 2 | /* let later = 10; */ 3 | 4 | /* Ok testing things */ 5 | 6 | let something = 10; 7 | 8 | type person = {name: string, age: int}; 9 | 10 | type animals = Things(int) | People(string) | Mouse; 11 | 12 | let inner = 10; 13 | /* More.outer; */ 14 | 15 | 16 | let m = Things(1); 17 | 18 | /* working on things. */ 19 | 20 | 21 | let z = {name: "hi", age: 20}; 22 | 23 | let later = 20; 24 | 25 | let concat = (~first, ~second) => first + second; 26 | 27 | type other = {person, height: float}; 28 | let oo = {person: z, height: 34.2}; 29 | 30 | let show = o => { 31 | let m = o.height; 32 | }; 33 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/lib/SomeFile.ml: -------------------------------------------------------------------------------- 1 | let x = 10 2 | 3 | let y = 20 4 | 5 | let m x y = 6 | let z = x + y in 7 | z 8 | -------------------------------------------------------------------------------- /examples/example-esy-dune-project/lib/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name lib) 3 | (modules_without_implementation awesome)) -------------------------------------------------------------------------------- /examples/example-esy-dune-project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello", 3 | "version": "0.1.0", 4 | "esy": { 5 | "build": "refmterr dune build -p #{self.name}" 6 | }, 7 | "dependencies": { 8 | "@opam/dune": "*", 9 | "@esy-ocaml/reason": "*", 10 | "refmterr": "*", 11 | "ocaml": "~4.6.0" 12 | }, 13 | "devDependencies": { 14 | "@esy-ocaml/merlin": "*", 15 | "ocaml": "~4.6.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/example-monorepo/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeLens": true, 3 | "reason_language_server.location": "../../lib/bs/native/bin.native", 4 | // "reason_language_server.location": "../lib/bs/native/bin.native.exe", 5 | // "reason_language_server.reloadOnChange": false 6 | } -------------------------------------------------------------------------------- /examples/example-monorepo/example-project/bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tryit", 3 | "sources": "src", 4 | "refmt": 3 5 | } -------------------------------------------------------------------------------- /examples/example-monorepo/example-project/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "bs-platform": { 6 | "version": "3.0.0", 7 | "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-3.0.0.tgz", 8 | "integrity": "sha1-OPIAcw21L96jeBk3a2rD37ICRMA=" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/example-monorepo/example-project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "bs-platform": "^3.0.0" 4 | }, 5 | "scripts": { 6 | "build": "bsb -make-world", 7 | "start": "bsb -make-world -w" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/example-monorepo/example-project/src/More.re: -------------------------------------------------------------------------------- 1 | /** Toplevel docs */; 2 | 3 | /** Some contents */ 4 | let contnets = "here"; -------------------------------------------------------------------------------- /examples/example-monorepo/example-project/src/Other.re: -------------------------------------------------------------------------------- 1 | 2 | /* let later = 10; */ 3 | 4 | /* Ok testing things */ 5 | 6 | let something = 10; 7 | 8 | type person = {name: string, age: int}; 9 | 10 | type animals = Dogz(int) | Cat(string) | Mouse; 11 | 12 | let m = Dogz(1); 13 | 14 | let z = {name: "hi", age: 20}; 15 | 16 | let later = 20; 17 | 18 | /* let e = z.name; */ 19 | -------------------------------------------------------------------------------- /examples/example-monorepo/example-react/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .merlin 3 | .bsb.lock 4 | npm-debug.log 5 | /lib/bs/ 6 | /node_modules/ -------------------------------------------------------------------------------- /examples/example-monorepo/example-react/bsconfig.json: -------------------------------------------------------------------------------- 1 | /* This is the BuckleScript configuration file. Note that this is a comment; 2 | BuckleScript comes with a JSON parser that supports comments and trailing 3 | comma. If this screws with your editor highlighting, please tell us by filing 4 | an issue! */ 5 | { 6 | "name": "react-template", 7 | "reason": { 8 | "react-jsx": 2 9 | }, 10 | "sources": { 11 | "dir" : "src", 12 | "subdirs" : true 13 | }, 14 | "package-specs": [{ 15 | "module": "commonjs", 16 | "in-source": true 17 | }], 18 | "suffix": ".bs.js", 19 | "namespace": true, 20 | "bs-dependencies": [ 21 | "reason-react", "@glennsl/bs-json" 22 | ], 23 | "refmt": 3 24 | } 25 | -------------------------------------------------------------------------------- /examples/example-monorepo/example-react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-react", 3 | "version": "0.1.0", 4 | "scripts": { 5 | "build": "bsb -make-world", 6 | "start": "bsb -make-world -w", 7 | "clean": "bsb -clean-world", 8 | "test": "echo \"Error: no test specified\" && exit 1", 9 | "webpack": "webpack -w", 10 | "webpack:production": "NODE_ENV=production webpack" 11 | }, 12 | "keywords": [ 13 | "BuckleScript" 14 | ], 15 | "author": "", 16 | "license": "MIT", 17 | "dependencies": { 18 | "@glennsl/bs-json": "^2.0.0", 19 | "react": "^16.2.0", 20 | "react-dom": "^16.2.0", 21 | "reason-react": ">=0.4.0" 22 | }, 23 | "devDependencies": { 24 | "bs-platform": "^3.2.0", 25 | "webpack": "^4.0.1", 26 | "webpack-cli": "^2.0.10" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /examples/example-monorepo/example-react/src/Component1.re: -------------------------------------------------------------------------------- 1 | /* This is the basic component. */ 2 | let component = ReasonReact.statelessComponent("Page"); 3 | 4 | /* Your familiar handleClick from ReactJS. This mandatorily takes the payload, 5 | then the `self` record, which contains state (none here), `handle`, `reduce` 6 | and other utilities */ 7 | let handleClick = (_event, _self) => Js.log("clicked!"); 8 | /* let x = () => */ 9 | 10 | /* `make` is the function that mandatorily takes `children` (if you want to use 11 | `JSX). `message` is a named argument, which simulates ReactJS props. Usage: 12 | 13 | `` 14 | 15 | Which desugars to 16 | 17 | `ReasonReact.element(Page.make(~message="hello", [||]))` */ 18 | let make = (~message, _children) => { 19 | ...component, 20 | render: self => 21 |
22 | (ReasonReact.string(message)) 23 |
, 24 | }; -------------------------------------------------------------------------------- /examples/example-monorepo/example-react/src/Index.bs.js: -------------------------------------------------------------------------------- 1 | // Generated by BUCKLESCRIPT VERSION 3.2.0, PLEASE EDIT WITH CARE 2 | 'use strict'; 3 | 4 | var ReactDOMRe = require("/Users/jared/clone/tools/reason-language-server/examples/example-react/node_modules/reason-react/src/ReactDOMRe.js"); 5 | var ReasonReact = require("/Users/jared/clone/tools/reason-language-server/examples/example-react/node_modules/reason-react/src/ReasonReact.js"); 6 | var Component1$ReactTemplate = require("./Component1.bs.js"); 7 | var Component2$ReactTemplate = require("./Component2.bs.js"); 8 | 9 | ReactDOMRe.renderToElementWithId(ReasonReact.element(/* None */0, /* None */0, Component1$ReactTemplate.make("Hello!", /* array */[])), "index1"); 10 | 11 | ReactDOMRe.renderToElementWithId(ReasonReact.element(/* None */0, /* None */0, Component2$ReactTemplate.make("Hello!", /* array */[])), "index2"); 12 | 13 | /* Not a pure module */ 14 | -------------------------------------------------------------------------------- /examples/example-monorepo/example-react/src/Index.re: -------------------------------------------------------------------------------- 1 | ReactDOMRe.renderToElementWithId(, "index1"); 2 | 3 | ReactDOMRe.renderToElementWithId(, "index2"); -------------------------------------------------------------------------------- /examples/example-monorepo/example-react/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ReasonReact Examples 6 | 7 | 8 | Component 1: 9 |
10 | Component 2: 11 |
12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/example-monorepo/example-react/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const outputDir = path.join(__dirname, "build/"); 3 | 4 | const isProd = process.env.NODE_ENV === 'production'; 5 | 6 | module.exports = { 7 | entry: './src/Index.bs.js', 8 | mode: isProd ? 'production' : 'development', 9 | output: { 10 | path: outputDir, 11 | publicPath: outputDir, 12 | filename: 'Index.js', 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /examples/example-monorepo/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /examples/example-native-project/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeLens": true, 3 | "reason_language_server.location": "../../_esy/default/build/install/default/bin/Bin", 4 | "reason_language_server.show_debug_errors": true 5 | } 6 | -------------------------------------------------------------------------------- /examples/example-native-project/bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docre", 3 | "bsc-flags": "-w -27-32 -g", 4 | "ocaml-flags": ["-g", 5 | // "-bin-annot" 6 | ], 7 | "warnings": { 8 | "number": "-40-6+7-26-27-32..39-28-44-45", 9 | "error": "+8" 10 | }, 11 | "sources": [ 12 | {"dir": "src", "subdirs": true}, 13 | ], 14 | "bs-dependencies": ["rex-json", "reprocessing"], 15 | "ocaml-dependencies": ["compiler-libs", "unix", "bigarray", "str"], 16 | "public": ["Main"], 17 | "entries": [{ 18 | "backend": "native", 19 | "main-module": "Other" 20 | }], 21 | "refmt": 3 22 | } 23 | -------------------------------------------------------------------------------- /examples/example-native-project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@jaredly/reason-language-server", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "bsb -make-world -backend native -w", 6 | "build": "bsb -make-world -backend native", 7 | "clean": "bsb -clean-world", 8 | "watch": "bsb -make-world -backend native -w", 9 | "postinstall": "bsb -make-world -backend native" 10 | }, 11 | "keywords": [ 12 | "BuckleScript", 13 | "documentation", 14 | "generator" 15 | ], 16 | "repository": { 17 | "url": "jaredly/language-server", 18 | "type": "git" 19 | }, 20 | "description": "A pure-reason implementation of a language server", 21 | "author": "Jared Forsyth", 22 | "license": "ISC", 23 | "dependencies": { 24 | "bs-platform": "bsansouci/bsb-native#fast", 25 | "Reprocessing": "schmavery/Reprocessing", 26 | "rex-json": "1.4.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /examples/example-native-project/src/Files.re: -------------------------------------------------------------------------------- 1 | 2 | 3 | let x = 10; 4 | 5 | let y = x; 6 | open Reprocessing; 7 | Constants.black; 8 | 9 | /* TODO: autocomplete Constants.b[lack] 10 | TODO: autocomplete Reprocessing.D[raw] */ -------------------------------------------------------------------------------- /examples/example-native-project/src/Mainz.re: -------------------------------------------------------------------------------- 1 | 2 | module S = Set.Make({type t = int; let compare = compare;}); 3 | 4 | 5 | module M = { 6 | let x = 10; 7 | }; 8 | 9 | let x = M.x; -------------------------------------------------------------------------------- /examples/example-native-project/src/Other.re: -------------------------------------------------------------------------------- 1 | 2 | let y = Mainz.x; 3 | 4 | let z = Mainz.M.x; 5 | let e = Mainz.S.add; 6 | 7 | -------------------------------------------------------------------------------- /examples/example-opam-dune-project/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeLens": true, 3 | // "reason_language_server.location": "../../lib/bs/native/bin.native", 4 | "reason_language_server.location": "../../_esy/default/build/install/default/bin/Bin", 5 | // "reason_language_server.location": "../lib/bs/native/bin.native.exe", 6 | "reason_language_server.reloadOnChange": true, 7 | "reason_language_server.per_value_codelens": false, 8 | "reason_language_server.show_debug_errors": true, 9 | //"reason_language_server.show_module_path_on_hover": false 10 | } 11 | -------------------------------------------------------------------------------- /examples/example-opam-dune-project/dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.3) 2 | -------------------------------------------------------------------------------- /examples/example-opam-dune-project/example-opam-dune.opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "example-opam-dune" 3 | version: "0.1" 4 | license: "ISC" 5 | depends: [ 6 | "base" 7 | "cmdliner" 8 | "dune" {build} 9 | "reason" {build} 10 | "ppx_expect" {build} 11 | "ppx_inline_test" {build} 12 | ] 13 | build: [ 14 | [dune "build" "-p" name "-j" jobs] 15 | ] 16 | -------------------------------------------------------------------------------- /examples/example-opam-dune-project/src/bin/dune: -------------------------------------------------------------------------------- 1 | (executable 2 | (name Hello) 3 | (public_name Hello.exe) 4 | (libraries lib) 5 | (flags (:standard -w -27-32-33)) 6 | ) 7 | -------------------------------------------------------------------------------- /examples/example-opam-dune-project/src/lib/Awesome.rei: -------------------------------------------------------------------------------- 1 | type atype = { 2 | name: int, 3 | age: int, 4 | }; -------------------------------------------------------------------------------- /examples/example-opam-dune-project/src/lib/Hi.ml: -------------------------------------------------------------------------------- 1 | let hullo = "hi world" 2 | 3 | let f1 = 1 4 | 5 | (* let%test _ = f1 = 2 *) 6 | 7 | (* the following should fail `dune runtest` *) 8 | let%expect_test "ppx_expect test" = 9 | print_endline "actual"; 10 | [%expect {| 11 | expected 12 | |}] 13 | -------------------------------------------------------------------------------- /examples/example-opam-dune-project/src/lib/More.re: -------------------------------------------------------------------------------- 1 | /** Toplevel docs */; 2 | 3 | /** Some contents */ 4 | let contnets = "here"; 5 | 6 | let inner = 20; 7 | 8 | let n = 10; 9 | 10 | let party = 30; 11 | 12 | let outer = 40; 13 | 14 | Other.inner; 15 | -------------------------------------------------------------------------------- /examples/example-opam-dune-project/src/lib/Other.re: -------------------------------------------------------------------------------- 1 | 2 | /* let later = 10; */ 3 | 4 | /* Ok testing things */ 5 | 6 | let something = 10; 7 | 8 | type person = {name: string, age: int}; 9 | 10 | type animals = Things(int) | People(string) | Mouse; 11 | 12 | let inner = 10; 13 | /* More.outer; */ 14 | 15 | 16 | let m = Things(1); 17 | 18 | /* working on things. */ 19 | 20 | 21 | let z = {name: "hi", age: 20}; 22 | 23 | let later = 20; 24 | 25 | let concat = (~first, ~second) => first + second; 26 | 27 | type other = {person, height: float}; 28 | let oo = {person: z, height: 34.2}; 29 | 30 | let show = o => { 31 | let m = o.height; 32 | m 33 | }; 34 | -------------------------------------------------------------------------------- /examples/example-opam-dune-project/src/lib/SomeFile.ml: -------------------------------------------------------------------------------- 1 | let x = 10 2 | 3 | let y = 20 4 | 5 | let m x y = 6 | let z = x + y in 7 | z 8 | -------------------------------------------------------------------------------- /examples/example-opam-dune-project/src/lib/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name lib) 3 | (public_name example-opam-dune) 4 | (modules_without_implementation awesome) 5 | (inline_tests) 6 | (preprocess 7 | (pps ppx_expect ppx_inline_test)) 8 | (flags (:standard -w -27-32-33))) 9 | -------------------------------------------------------------------------------- /examples/example-project/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeLens": true, 3 | // "reason_language_server.location": "../../lib/bs/native/bin.native", 4 | "reason_language_server.location": "../../_build/default/bin/Bin.exe", 5 | // "reason_language_server.location": "../lib/bs/native/bin.native.exe", 6 | "reason_language_server.reloadOnChange": true, 7 | "reason_language_server.per_value_codelens": false, 8 | "reason_language_server.show_debug_errors": true, 9 | // "reason_language_server.autoRebuild": false, 10 | //"reason_language_server.show_module_path_on_hover": false 11 | } 12 | -------------------------------------------------------------------------------- /examples/example-project/bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tryit", 3 | "sources": "src", 4 | "bsc-flags": ["-bs-super-errors", "-open Belt"], 5 | "warnings": { 6 | "number": "-32-26-27-33" 7 | }, 8 | "namespace": "try-it", 9 | "refmt": 3 10 | } -------------------------------------------------------------------------------- /examples/example-project/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "bs-platform": { 6 | "version": "5.0.0", 7 | "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-5.0.0.tgz", 8 | "integrity": "sha512-zxLobdIaf/r7go47hOgxcd6C0ANh7MYMEtZNb9Al7JdoekzFZI50F4GpZpP8kMh9Z+M5PoPE1WuryT4S8mT8Kg==" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/example-project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "bs-platform": "^5.0.0" 4 | }, 5 | "scripts": { 6 | "build": "bsb -make-world", 7 | "start": "bsb -make-world -w" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/example-project/src/Awesome.rei: -------------------------------------------------------------------------------- 1 | type atype = { 2 | name: int, 3 | age: int, 4 | }; -------------------------------------------------------------------------------- /examples/example-project/src/Embeded.md: -------------------------------------------------------------------------------- 1 | # Markdown Embedded Fenced Code Regression Test 2 | 3 | ```re 4 | module Something = { 5 | open Other; 6 | 7 | let m = {name: "Me", age: 0}; 8 | let animal = Things(10); 9 | let other = Things(2); 10 | let me: animals = People("Hie"); 11 | let x = something + 10; 12 | let r = m.name; 13 | 14 | let awesome = 20; 15 | if (true) { 16 | () 17 | } 18 | }; 19 | ``` 20 | 21 | ```reason 22 | module Something = { 23 | open Other; 24 | 25 | let m = {name: "Me", age: 0}; 26 | let animal = Things(10); 27 | let other = Things(2); 28 | let me: animals = People("Hie"); 29 | let x = something + 10; 30 | let r = m.name; 31 | 32 | let awesome = 20; 33 | if (true) { 34 | () 35 | } 36 | }; 37 | ``` 38 | 39 | ```reasonml 40 | module Something = { 41 | open Other; 42 | 43 | let m = {name: "Me", age: 0}; 44 | let animal = Things(10); 45 | let other = Things(2); 46 | let me: animals = People("Hie"); 47 | let x = something + 10; 48 | let r = m.name; 49 | 50 | let awesome = 20; 51 | if (true) { 52 | () 53 | } 54 | }; 55 | ``` -------------------------------------------------------------------------------- /examples/example-project/src/More.re: -------------------------------------------------------------------------------- 1 | /** Toplevel docs */; 2 | 3 | /** Some contents */ 4 | let contnets = "here"; 5 | 6 | let inner = 20; 7 | 8 | let n = 10; 9 | 10 | let party = 30; 11 | 12 | let awesome = 200; -------------------------------------------------------------------------------- /examples/example-project/src/More.rei: -------------------------------------------------------------------------------- 1 | 2 | let contnets: string; 3 | let inner: int; 4 | let n: int; 5 | let party: int -------------------------------------------------------------------------------- /examples/example-project/src/Other.re: -------------------------------------------------------------------------------- 1 | 2 | /* let later = 10; */ 3 | 4 | /* Ok testing things */ 5 | 6 | let something = 10; 7 | 8 | type person = {name: string, age: int}; 9 | 10 | type animals = Things(int) | People(string) | Mouse; 11 | 12 | let inner = 10; 13 | /* More.outer; */ 14 | 15 | 16 | let m = Things(1); 17 | 18 | /* working on things. */ 19 | 20 | 21 | let z = {name: "hi", age: 20}; 22 | 23 | let later = 20; 24 | 25 | let concat = (~first, ~second) => first + second; 26 | 27 | type other = {person, height: float}; 28 | let oo = {person: z, height: 34.2}; 29 | 30 | let show = o => { 31 | let m = o.height; 32 | }; 33 | -------------------------------------------------------------------------------- /examples/example-project/src/SomeFile.ml: -------------------------------------------------------------------------------- 1 | let x = 10 2 | 3 | let y = 20 4 | 5 | let m x y = 6 | let z = x + y in 7 | z 8 | -------------------------------------------------------------------------------- /examples/example-project/src/TransformHelpers.re: -------------------------------------------------------------------------------- 1 | 2 | let deserialize_Belt__HashMapInt__t = (transformer, t) => { 3 | assert(false) 4 | }; 5 | 6 | let deserialize_Belt_HashMapInt____t = (a, b) => assert(false); 7 | 8 | let deserialize_Belt__HashMap__Int__t = (a, b) => assert(false); 9 | 10 | let serialize_Belt_HashMapInt____t = (a, b) => assert(false); 11 | 12 | let serialize_Belt__HashMap__Int__t = (a, b) => assert(false); 13 | 14 | let serialize_Belt_HashMapInt____t = (transformer, t) => { 15 | assert(false) 16 | }; 17 | -------------------------------------------------------------------------------- /examples/example-project/types.json: -------------------------------------------------------------------------------- 1 | { 2 | "output": "src/Serde.ml", 3 | "engine": "rex-json", 4 | "entries": [ 5 | { 6 | "file": "src/Hello.re", 7 | "type": "lockfile" 8 | } 9 | ], 10 | "custom": [ 11 | {"module": "Belt_HashMapInt", "path": [], "name": "t", "args": 1} 12 | ] 13 | } -------------------------------------------------------------------------------- /examples/example-react/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .merlin 3 | .bsb.lock 4 | npm-debug.log 5 | /lib/bs/ 6 | /node_modules/ 7 | *.bs.js 8 | -------------------------------------------------------------------------------- /examples/example-react/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "reason_language_server.location": "../../bin.exe", 3 | "reason_language_server.per_value_codelens": false 4 | } -------------------------------------------------------------------------------- /examples/example-react/__tests__/example_tests.bs.js: -------------------------------------------------------------------------------- 1 | // Generated by BUCKLESCRIPT VERSION 4.0.5, PLEASE EDIT WITH CARE 2 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 3 | -------------------------------------------------------------------------------- /examples/example-react/__tests__/example_tests.re: -------------------------------------------------------------------------------- 1 | type assertion = Jest.assertion; 2 | -------------------------------------------------------------------------------- /examples/example-react/bsconfig.json: -------------------------------------------------------------------------------- 1 | /* This is the BuckleScript configuration file. Note that this is a comment; 2 | BuckleScript comes with a JSON parser that supports comments and trailing 3 | comma. If this screws with your editor highlighting, please tell us by filing 4 | an issue! */ 5 | { 6 | "name": "react-template", 7 | "reason": { 8 | "react-jsx": 2 9 | }, 10 | "sources": [ 11 | { 12 | "dir": "src", 13 | "subdirs" : true 14 | }, 15 | { 16 | "dir": "__tests__", 17 | "type": "dev" 18 | }], 19 | "bsc-flags": ["-open Belt"], 20 | "package-specs": [{ 21 | "module": "commonjs", 22 | "in-source": true 23 | }], 24 | "suffix": ".bs.js", 25 | "namespace": true, 26 | "bs-dependencies": [ 27 | "reason-react", "@glennsl/bs-json", "@glennsl/bs-jest" 28 | ], 29 | // "bs-dev-dependencies": ["@glennsl/bs-jest"], 30 | "refmt": 3 31 | } 32 | -------------------------------------------------------------------------------- /examples/example-react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-react", 3 | "version": "0.1.0", 4 | "scripts": { 5 | "build": "bsb -make-world", 6 | "start": "bsb -make-world -w", 7 | "clean": "bsb -clean-world", 8 | "test": "echo \"Error: no test specified\" && exit 1", 9 | "webpack": "webpack -w", 10 | "webpack:production": "NODE_ENV=production webpack" 11 | }, 12 | "keywords": [ 13 | "BuckleScript" 14 | ], 15 | "author": "", 16 | "license": "MIT", 17 | "dependencies": { 18 | "@glennsl/bs-json": "^3.0.0", 19 | "react": "^16.2.0", 20 | "react-dom": "^16.2.0", 21 | "reason-react": ">=0.4.0" 22 | }, 23 | "devDependencies": { 24 | "@glennsl/bs-jest": "^0.4.3", 25 | "bs-platform": "^4.0.0", 26 | "webpack": "^4.0.1", 27 | "webpack-cli": "^2.0.10" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /examples/example-react/src/Component1.re: -------------------------------------------------------------------------------- 1 | /* This is the basic component. */ 2 | let component = ReasonReact.statelessComponent("Page"); 3 | 4 | /* Your familiar handleClick from ReactJS. This mandatorily takes the payload, 5 | then the `self` record, which contains state (none here), `handle`, `reduce` 6 | and other utilities */ 7 | let handleClick = (_event, _self) => Js.log("clicked!"); 8 | /* let x = () => */ 9 | 10 | /* `make` is the function that mandatorily takes `children` (if you want to use 11 | `JSX). `message` is a named argument, which simulates ReactJS props. Usage: 12 | 13 | `` 14 | 15 | Which desugars to 16 | 17 | `ReasonReact.element(Page.make(~message="hello", [||]))` */ 18 | let make = (~message, _children) => { 19 | ...component, 20 | render: self => 21 |
22 | (ReasonReact.string(message)) 23 |
, 24 | }; 25 | 26 | let two = Component2.make; -------------------------------------------------------------------------------- /examples/example-react/src/Index.re: -------------------------------------------------------------------------------- 1 | 2 | module Awesome = { 3 | let x = 10; 4 | 1+3; 5 | let y = 10; 6 | let make = _ => ReasonReact.statelessComponent("hi"); 7 | }; 8 | 9 | ReactDOMRe.renderToElementWithId(, "index1"); 10 | 11 | /* awesome */ 12 | 13 | let x = (10 |. string_of_int) ++ "HI folks. It's great"; 14 | 15 | let er = ; 16 | 17 | ReactDOMRe.renderToElementWithId( 18 | , 19 | "index2" 20 | ); 21 | -------------------------------------------------------------------------------- /examples/example-react/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ReasonReact Examples 6 | 7 | 8 | Component 1: 9 |
10 | Component 2: 11 |
12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/example-react/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const outputDir = path.join(__dirname, "build/"); 3 | 4 | const isProd = process.env.NODE_ENV === 'production'; 5 | 6 | module.exports = { 7 | entry: './src/Index.bs.js', 8 | mode: isProd ? 'production' : 'development', 9 | output: { 10 | path: outputDir, 11 | publicPath: outputDir, 12 | filename: 'Index.js', 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /examples/example-workspace/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "reason_language_server.location": "../../lib/bs/native/bin.native", 3 | "reason_language_server.reloadOnChange": true 4 | } 5 | -------------------------------------------------------------------------------- /examples/example-workspace/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-workspace", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "private": true, 7 | "workspaces": [ 8 | "shared", 9 | "web" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /examples/example-workspace/shared/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | *.obj 3 | *.out 4 | *.compile 5 | *.native 6 | *.byte 7 | *.cmo 8 | *.annot 9 | *.cmi 10 | *.cmx 11 | *.cmt 12 | *.cmti 13 | *.cma 14 | *.a 15 | *.cmxa 16 | *.obj 17 | *~ 18 | *.annot 19 | *.cmj 20 | *.bak 21 | lib/bs 22 | *.mlast 23 | *.mliast 24 | .vscode 25 | .merlin 26 | .bsb.lock -------------------------------------------------------------------------------- /examples/example-workspace/shared/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Build 4 | ``` 5 | npm run build 6 | ``` 7 | 8 | # Watch 9 | 10 | ``` 11 | npm run watch 12 | ``` 13 | 14 | 15 | # Editor 16 | If you use `vscode`, Press `Windows + Shift + B` it will build automatically -------------------------------------------------------------------------------- /examples/example-workspace/shared/bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shared", 3 | "reason": { 4 | "react-jsx": 2 5 | }, 6 | "sources": { 7 | "dir": "src", 8 | "subdirs": true 9 | }, 10 | "package-specs": [ 11 | { 12 | "module": "commonjs", 13 | "in-source": true 14 | } 15 | ], 16 | "suffix": ".bs.js", 17 | "bs-dependencies": ["reason-react"], 18 | "refmt": 3 19 | } 20 | -------------------------------------------------------------------------------- /examples/example-workspace/shared/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shared", 3 | "version": "0.1.0", 4 | "scripts": { 5 | "clean": "bsb -clean-world", 6 | "build": "bsb -make-world", 7 | "watch": "bsb -make-world -w" 8 | }, 9 | "keywords": [ 10 | "BuckleScript" 11 | ], 12 | "author": "", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "bs-platform": "^4.0.0" 16 | }, 17 | "dependencies": { 18 | "@glennsl/bs-json": "^2.0.0", 19 | "react": "^16.4.1", 20 | "react-dom": "^16.4.1", 21 | "reason-react": "^0.4.2" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/example-workspace/shared/src/Box.re: -------------------------------------------------------------------------------- 1 | let component = ReasonReact.statelessComponent("Box"); 2 | let make = _children => { 3 | ...component, 4 | render: _self => 5 |
6 | (ReasonReact.string("Whats in the box?.... it's: " ++ _children)) 7 |
, 8 | }; -------------------------------------------------------------------------------- /examples/example-workspace/shared/src/Utils.re: -------------------------------------------------------------------------------- 1 | let doNothing = () => (); -------------------------------------------------------------------------------- /examples/example-workspace/web/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Build 4 | ``` 5 | npm run build 6 | ``` 7 | 8 | # Watch 9 | 10 | ``` 11 | npm run watch 12 | ``` 13 | 14 | 15 | # Editor 16 | If you use `vscode`, Press `Windows + Shift + B` it will build automatically -------------------------------------------------------------------------------- /examples/example-workspace/web/bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web", 3 | "reason": { 4 | "react-jsx": 2 5 | }, 6 | "sources": { 7 | "dir": "src", 8 | "subdirs": true 9 | }, 10 | "package-specs": 11 | { 12 | "module": "es6", 13 | "in-source": true 14 | } 15 | , 16 | "suffix": ".bs.js", 17 | 18 | "bs-dependencies": ["reason-react", "shared"], 19 | "refmt": 3 20 | } 21 | -------------------------------------------------------------------------------- /examples/example-workspace/web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "devDependencies": { 7 | "bs-platform": "^4.0.0" 8 | }, 9 | "scripts": { 10 | "clean": "bsb -clean-world", 11 | "build": "bsb -make-world", 12 | "watch": "bsb -make-world -w" 13 | }, 14 | "keywords": [ 15 | "BuckleScript" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /examples/example-workspace/web/src/Index.re: -------------------------------------------------------------------------------- 1 | let instance = ..."Its...Another box!" ; 2 | 3 | Utils.doNothing(); -------------------------------------------------------------------------------- /examples/name_with_underscore/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .merlin 3 | .bsb.lock 4 | npm-debug.log 5 | /lib/bs/ 6 | /node_modules/ 7 | -------------------------------------------------------------------------------- /examples/name_with_underscore/README.md: -------------------------------------------------------------------------------- 1 | # E2E test 2 | 3 | # Build 4 | ``` 5 | npm run build 6 | ``` 7 | 8 | # Build + Watch 9 | 10 | ``` 11 | npm run watch 12 | ``` 13 | 14 | 15 | # Editor 16 | If you use `vscode`, Press `Windows + Shift + B` it will build automatically 17 | -------------------------------------------------------------------------------- /examples/name_with_underscore/bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "name_with_underscore", 3 | "version": "0.1.0", 4 | "sources": [ 5 | "src" 6 | ], 7 | "package-specs": { 8 | "module": "commonjs", 9 | "in-source": true 10 | }, 11 | "suffix": ".bs.js", 12 | "bs-dependencies": [ 13 | "@aantron/repromise" 14 | ], 15 | "namespace": true, 16 | "refmt": 3 17 | } 18 | -------------------------------------------------------------------------------- /examples/name_with_underscore/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "name_with_underscore", 3 | "version": "0.1.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@aantron/repromise": { 8 | "version": "0.6.0", 9 | "resolved": "https://registry.npmjs.org/@aantron/repromise/-/repromise-0.6.0.tgz", 10 | "integrity": "sha512-nxNUWKQQhRJKmsExKi2qyZUryvpEz07H17fEhRaZC3wXkxCtjcdx9j5LMnV0+anbU+EyG/X+UnfATReerBZgMA==" 11 | }, 12 | "bs-platform": { 13 | "version": "4.0.5", 14 | "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-4.0.5.tgz", 15 | "integrity": "sha512-wK+yUx/5ojlrxgk/EB3Hla7+9NEnE8PxtGb71e4IsKnWPXrRAaVtdTuoWWClv8z77xntOFg8qTgYfYyh9xLMWA==", 16 | "dev": true 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /examples/name_with_underscore/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "name_with_underscore", 3 | "version": "0.1.0", 4 | "scripts": { 5 | "build": "bsb -make-world", 6 | "start": "bsb -make-world -w", 7 | "clean": "bsb -clean-world" 8 | }, 9 | "keywords": [ 10 | "BuckleScript" 11 | ], 12 | "author": "", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "bs-platform": "^4.0.5" 16 | }, 17 | "dependencies": { 18 | "@aantron/repromise": "^0.6.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/name_with_underscore/src/browsing.bs.js: -------------------------------------------------------------------------------- 1 | // Generated by BUCKLESCRIPT VERSION 4.0.5, PLEASE EDIT WITH CARE 2 | 'use strict'; 3 | 4 | var E2e$Namewithunderscore = require("./e2e.bs.js"); 5 | 6 | var y = E2e$Namewithunderscore.x; 7 | 8 | exports.y = y; 9 | /* No side effect */ 10 | -------------------------------------------------------------------------------- /examples/name_with_underscore/src/browsing.re: -------------------------------------------------------------------------------- 1 | open Belt.Result; /* Not necessary on native. */ 2 | let y = E2e.x; 3 | -------------------------------------------------------------------------------- /examples/name_with_underscore/src/e2e.bs.js: -------------------------------------------------------------------------------- 1 | // Generated by BUCKLESCRIPT VERSION 4.0.5, PLEASE EDIT WITH CARE 2 | 'use strict'; 3 | 4 | 5 | var x = 10; 6 | 7 | exports.x = x; 8 | /* No side effect */ 9 | -------------------------------------------------------------------------------- /examples/name_with_underscore/src/e2e.re: -------------------------------------------------------------------------------- 1 | let x = 10; 2 | 3 | -------------------------------------------------------------------------------- /examples/name_with_underscore/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | "command": "npm", 4 | "options": { 5 | "cwd": "${workspaceRoot}" 6 | }, 7 | "isShellCommand": true, 8 | "args": [ 9 | "run", 10 | "watch" 11 | ], 12 | "showOutput": "always", 13 | "isBackground": true, 14 | "problemMatcher": { 15 | "fileLocation": "absolute", 16 | "owner": "ocaml", 17 | "watching": { 18 | "activeOnStart": false, 19 | "beginsPattern": ">>>> Start compiling", 20 | "endsPattern": ">>>> Finish compiling" 21 | }, 22 | "pattern": [ 23 | { 24 | "regexp": "^File \"(.*)\", line (\\d+)(?:, characters (\\d+)-(\\d+))?:$", 25 | "file": 1, 26 | "line": 2, 27 | "column": 3, 28 | "endColumn": 4 29 | }, 30 | { 31 | "regexp": "^(?:(?:Parse\\s+)?(Warning|[Ee]rror)(?:\\s+\\d+)?:)?\\s+(.*)$", 32 | "severity": 1, 33 | "message": 2, 34 | "loop": true 35 | } 36 | ] 37 | } 38 | } -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/logo.png -------------------------------------------------------------------------------- /ocaml_typing/402/annot.mli: -------------------------------------------------------------------------------- 1 | (***********************************************************************) 2 | (* *) 3 | (* OCaml *) 4 | (* *) 5 | (* Damien Doligez, projet Gallium, INRIA Rocquencourt *) 6 | (* *) 7 | (* Copyright 2007 Institut National de Recherche en Informatique et *) 8 | (* en Automatique. All rights reserved. This file is distributed *) 9 | (* under the terms of the Q Public License version 1.0. *) 10 | (* *) 11 | (***********************************************************************) 12 | 13 | (* Data types for annotations (Stypes.ml) *) 14 | 15 | type call = Tail | Stack | Inline;; 16 | 17 | type ident = 18 | | Iref_internal of Location.t (* defining occurrence *) 19 | | Iref_external 20 | | Idef of Location.t (* scope *) 21 | ;; 22 | -------------------------------------------------------------------------------- /ocaml_typing/402/compmisc.mli: -------------------------------------------------------------------------------- 1 | (***********************************************************************) 2 | (* *) 3 | (* OCaml *) 4 | (* *) 5 | (* Fabrice Le Fessant, EPI Gallium, INRIA Paris-Rocquencourt *) 6 | (* *) 7 | (* Copyright 2013 Institut National de Recherche en Informatique et *) 8 | (* en Automatique. All rights reserved. This file is distributed *) 9 | (* under the terms of the Q Public License version 1.0. *) 10 | (* *) 11 | (***********************************************************************) 12 | 13 | val init_path : bool -> unit 14 | val initial_env : unit -> Env.t 15 | -------------------------------------------------------------------------------- /ocaml_typing/402/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Compiler_libs_402) 3 | (public_name reason-language-server.Compiler_libs_402) 4 | (modules_without_implementation annot outcometree asttypes parsetree 5 | runtimedef) 6 | (libraries Current) 7 | (flags :standard -w -A)) 8 | -------------------------------------------------------------------------------- /ocaml_typing/402/longident.mli: -------------------------------------------------------------------------------- 1 | (***********************************************************************) 2 | (* *) 3 | (* OCaml *) 4 | (* *) 5 | (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) 6 | (* *) 7 | (* Copyright 1996 Institut National de Recherche en Informatique et *) 8 | (* en Automatique. All rights reserved. This file is distributed *) 9 | (* under the terms of the Q Public License version 1.0. *) 10 | (* *) 11 | (***********************************************************************) 12 | 13 | (* Long identifiers, used in parsetree. *) 14 | 15 | type t = Current.longident = 16 | Lident of string 17 | | Ldot of t * string 18 | | Lapply of t * t 19 | 20 | val flatten: t -> string list 21 | val last: t -> string 22 | val parse: string -> t 23 | -------------------------------------------------------------------------------- /ocaml_typing/402/printlambda.mli: -------------------------------------------------------------------------------- 1 | (***********************************************************************) 2 | (* *) 3 | (* OCaml *) 4 | (* *) 5 | (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) 6 | (* *) 7 | (* Copyright 1996 Institut National de Recherche en Informatique et *) 8 | (* en Automatique. All rights reserved. This file is distributed *) 9 | (* under the terms of the Q Public License version 1.0. *) 10 | (* *) 11 | (***********************************************************************) 12 | 13 | open Lambda 14 | 15 | open Format 16 | 17 | val structured_constant: formatter -> structured_constant -> unit 18 | val lambda: formatter -> lambda -> unit 19 | val primitive: formatter -> primitive -> unit 20 | -------------------------------------------------------------------------------- /ocaml_typing/402/printtyped.mli: -------------------------------------------------------------------------------- 1 | (***********************************************************************) 2 | (* *) 3 | (* OCaml *) 4 | (* *) 5 | (* Damien Doligez, projet Para, INRIA Rocquencourt *) 6 | (* *) 7 | (* Copyright 1999 Institut National de Recherche en Informatique et *) 8 | (* en Automatique. All rights reserved. This file is distributed *) 9 | (* under the terms of the Q Public License version 1.0. *) 10 | (* *) 11 | (***********************************************************************) 12 | 13 | open Typedtree;; 14 | open Format;; 15 | 16 | val interface : formatter -> signature -> unit;; 17 | val implementation : formatter -> structure -> unit;; 18 | 19 | val implementation_with_coercion : 20 | formatter -> (structure * module_coercion) -> unit;; 21 | -------------------------------------------------------------------------------- /ocaml_typing/402/runtimedef.mli: -------------------------------------------------------------------------------- 1 | (***********************************************************************) 2 | (* *) 3 | (* OCaml *) 4 | (* *) 5 | (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) 6 | (* *) 7 | (* Copyright 1996 Institut National de Recherche en Informatique et *) 8 | (* en Automatique. All rights reserved. This file is distributed *) 9 | (* under the terms of the Q Public License version 1.0. *) 10 | (* *) 11 | (***********************************************************************) 12 | 13 | (* Values and functions known and/or provided by the runtime system *) 14 | 15 | val builtin_exceptions: string array 16 | val builtin_primitives: string array 17 | -------------------------------------------------------------------------------- /ocaml_typing/402/translclass.mli: -------------------------------------------------------------------------------- 1 | (***********************************************************************) 2 | (* *) 3 | (* OCaml *) 4 | (* *) 5 | (* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *) 6 | (* *) 7 | (* Copyright 1996 Institut National de Recherche en Informatique et *) 8 | (* en Automatique. All rights reserved. This file is distributed *) 9 | (* under the terms of the Q Public License version 1.0. *) 10 | (* *) 11 | (***********************************************************************) 12 | 13 | open Typedtree 14 | open Lambda 15 | 16 | val transl_class : 17 | Ident.t list -> Ident.t -> 18 | string list -> class_expr -> Asttypes.virtual_flag -> lambda;; 19 | 20 | type error = Illegal_class_expr | Tags of string * string 21 | 22 | exception Error of Location.t * error 23 | 24 | open Format 25 | 26 | val report_error: formatter -> error -> unit 27 | -------------------------------------------------------------------------------- /ocaml_typing/406/ast_invariants.mli: -------------------------------------------------------------------------------- 1 | (**************************************************************************) 2 | (* *) 3 | (* OCaml *) 4 | (* *) 5 | (* Jeremie Dimino, Jane Street Europe *) 6 | (* *) 7 | (* Copyright 2015 Jane Street Group LLC *) 8 | (* *) 9 | (* All rights reserved. This file is distributed under the terms of *) 10 | (* the GNU Lesser General Public License version 2.1, with the *) 11 | (* special exception on linking described in the file LICENSE. *) 12 | (* *) 13 | (**************************************************************************) 14 | 15 | (** Check AST invariants *) 16 | 17 | val structure : Parsetree.structure -> unit 18 | val signature : Parsetree.signature -> unit 19 | -------------------------------------------------------------------------------- /ocaml_typing/406/compplugin.mli: -------------------------------------------------------------------------------- 1 | (**************************************************************************) 2 | (* *) 3 | (* OCaml *) 4 | (* *) 5 | (* Fabrice Le Fessant, projet Gallium, INRIA Rocquencourt *) 6 | (* *) 7 | (* Copyright 1996 Institut National de Recherche en Informatique et *) 8 | (* en Automatique. *) 9 | (* *) 10 | (* All rights reserved. This file is distributed under the terms of *) 11 | (* the GNU Lesser General Public License version 2.1, with the *) 12 | (* special exception on linking described in the file LICENSE. *) 13 | (* *) 14 | (**************************************************************************) 15 | 16 | val load : string -> unit 17 | -------------------------------------------------------------------------------- /ocaml_typing/406/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Compiler_libs_406) 3 | (public_name reason-language-server.Compiler_libs_406) 4 | (modules_without_implementation annot outcometree asttypes cmo_format 5 | compdynlink parsetree) 6 | (libraries Current) 7 | (flags :standard -w -8-9-3-27)) 8 | -------------------------------------------------------------------------------- /ocaml_typing/407/ast_invariants.mli: -------------------------------------------------------------------------------- 1 | (**************************************************************************) 2 | (* *) 3 | (* OCaml *) 4 | (* *) 5 | (* Jeremie Dimino, Jane Street Europe *) 6 | (* *) 7 | (* Copyright 2015 Jane Street Group LLC *) 8 | (* *) 9 | (* All rights reserved. This file is distributed under the terms of *) 10 | (* the GNU Lesser General Public License version 2.1, with the *) 11 | (* special exception on linking described in the file LICENSE. *) 12 | (* *) 13 | (**************************************************************************) 14 | 15 | (** Check AST invariants *) 16 | 17 | val structure : Parsetree.structure -> unit 18 | val signature : Parsetree.signature -> unit 19 | -------------------------------------------------------------------------------- /ocaml_typing/407/build_path_prefix_map.mli: -------------------------------------------------------------------------------- 1 | type path = string 2 | type path_prefix = string 3 | type error_message = string 4 | 5 | val encode_prefix : path_prefix -> string 6 | val decode_prefix : string -> (path_prefix, error_message) result 7 | 8 | type pair = { target: path_prefix; source : path_prefix } 9 | 10 | val encode_pair : pair -> string 11 | val decode_pair : string -> (pair, error_message) result 12 | 13 | type map = pair option list 14 | 15 | val encode_map : map -> string 16 | val decode_map : string -> (map, error_message) result 17 | 18 | val rewrite_opt : map -> path -> path option 19 | (** [rewrite_opt map path] tries to find a source in [map] 20 | that is a prefix of the input [path]. If it succeeds, 21 | it replaces this prefix with the corresponding target. 22 | If it fails, it just returns [None]. *) 23 | 24 | val rewrite : map -> path -> path 25 | -------------------------------------------------------------------------------- /ocaml_typing/407/compplugin.mli: -------------------------------------------------------------------------------- 1 | (**************************************************************************) 2 | (* *) 3 | (* OCaml *) 4 | (* *) 5 | (* Fabrice Le Fessant, projet Gallium, INRIA Rocquencourt *) 6 | (* *) 7 | (* Copyright 1996 Institut National de Recherche en Informatique et *) 8 | (* en Automatique. *) 9 | (* *) 10 | (* All rights reserved. This file is distributed under the terms of *) 11 | (* the GNU Lesser General Public License version 2.1, with the *) 12 | (* special exception on linking described in the file LICENSE. *) 13 | (* *) 14 | (**************************************************************************) 15 | 16 | val load : string -> unit 17 | -------------------------------------------------------------------------------- /ocaml_typing/407/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Compiler_libs_407) 3 | (public_name reason-language-server.Compiler_libs_407) 4 | (modules_without_implementation annot outcometree asttypes parsetree 5 | compdynlink cmo_format) 6 | (libraries Current) 7 | (flags :standard -w -8-9-3)) 8 | -------------------------------------------------------------------------------- /ocaml_typing/408/Compiler_libs_408.re: -------------------------------------------------------------------------------- 1 | module Parsetree = Parsetree; 2 | module Typedtree = Typedtree; 3 | module Types = Types; 4 | module Location = Location; 5 | module Path = Path; 6 | module Ident = Ident; 7 | module Asttypes = Asttypes; 8 | module Cmi_format = Cmi_format; 9 | module Cmt_format = Cmt_format; 10 | 11 | /* Unfortunately we need to depend on Compiler_libs_406, otherwise we can't 12 | * construct an ident with a custom stamp. 13 | */ 14 | let makeIdent = (name, stamp) => { 15 | let ident = Current.Local({ name, stamp }); 16 | (Obj.magic(ident): Ident.t); 17 | }; 18 | 19 | 20 | -------------------------------------------------------------------------------- /ocaml_typing/408/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Compiler_libs_408) 3 | (public_name reason-language-server.Compiler_libs_408) 4 | (libraries compiler-libs.common Current)) 5 | -------------------------------------------------------------------------------- /ocaml_typing/current/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Current) 3 | (public_name reason-language-server.Current) 4 | (libraries compiler-libs.common) 5 | (flags 6 | (:standard -w -9-3))) 7 | -------------------------------------------------------------------------------- /old_ocamls/407/dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.6) 2 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "ocaml": "~4.7", 4 | "@esy-ocaml/reason": "*" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 | * text eol=lf 4 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 | !* 4 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/opam/base-threads.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Threads library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/opam/base-unix.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Unix library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/opam/conf-m4.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "tim@gfxmonk.net" 3 | homepage: "http://www.gnu.org/software/m4/m4.html" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | authors: "GNU Project" 6 | license: "GPL-3.0-only" 7 | build: [["sh" "-exc" "echo | m4"]] 8 | depexts: [ 9 | ["m4"] {os-family = "debian"} 10 | ["m4"] {os-distribution = "fedora"} 11 | ["m4"] {os-distribution = "rhel"} 12 | ["m4"] {os-distribution = "centos"} 13 | ["m4"] {os-distribution = "alpine"} 14 | ["m4"] {os-distribution = "nixos"} 15 | ["m4"] {os-family = "suse"} 16 | ["m4"] {os-distribution = "ol"} 17 | ["m4"] {os-distribution = "arch"} 18 | ] 19 | synopsis: "Virtual package relying on m4" 20 | description: 21 | "This package can only install if the m4 binary is installed on the system." 22 | flags: conf 23 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/opam/menhir.20190924/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "francois.pottier@inria.fr" 3 | authors: [ 4 | "François Pottier " 5 | "Yann Régis-Gianas " 6 | ] 7 | homepage: "http://gitlab.inria.fr/fpottier/menhir" 8 | dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" 9 | bug-reports: "menhir@inria.fr" 10 | build: [ 11 | [make "-f" "Makefile" "PREFIX=%{prefix}%" "USE_OCAMLFIND=true" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 12 | ] 13 | install: [ 14 | [make "-f" "Makefile" "install" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 15 | ] 16 | depends: [ 17 | "ocaml" {>= "4.02"} 18 | "ocamlfind" {build} 19 | "ocamlbuild" {build} 20 | ] 21 | synopsis: "An LR(1) parser generator" 22 | url { 23 | src: 24 | "https://gitlab.inria.fr/fpottier/menhir/repository/20190924/archive.tar.gz" 25 | checksum: [ 26 | "md5=677f1997fb73177d5a00fa1b8d61c3ef" 27 | "sha512=ea8a9a6d773529cf6ac05e4c6c4532770fbb8e574c9b646efcefe90d9f24544741e3e8cfd94c8afea0447e34059a8c79c2829b46764ce3a3d6dcb3e7f75980fc" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/opam/merlin-extend.0.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Frederic Bour " 3 | authors: "Frederic Bour " 4 | homepage: "https://github.com/let-def/merlin-extend" 5 | bug-reports: "https://github.com/let-def/merlin-extend" 6 | license: "MIT" 7 | dev-repo: "git+https://github.com/let-def/merlin-extend.git" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "dune" {>= "1.0"} 14 | "cppo" {build} 15 | "ocaml" {>= "4.02.3"} 16 | ] 17 | synopsis: "A protocol to provide custom frontend to Merlin" 18 | description: """ 19 | This protocol allows to replace the OCaml frontend of Merlin. 20 | It extends what used to be done with the `-pp' flag to handle a few more cases.""" 21 | doc: "https://let-def.github.io/merlin-extend" 22 | url { 23 | src: 24 | "https://github.com/let-def/merlin-extend/releases/download/v0.5/merlin-extend-v0.5.tbz" 25 | checksum: [ 26 | "sha256=ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227" 27 | "sha512=55c5a3637337abb8ca8db679128a81ca8ccce567bc214d55b2e6444dc0e905b74c64d629bdea2457d0fe4be5306414feefcdbc4d4761fdafd59aa107550936b6" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BINDIR=$(dirname "$(command -v ocamlc)") 4 | "$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" 5 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install: -------------------------------------------------------------------------------- 1 | bin: [ 2 | "src/findlib/ocamlfind" {"ocamlfind"} 3 | "?src/findlib/ocamlfind_opt" {"ocamlfind"} 4 | "?tools/safe_camlp4" 5 | ] 6 | toplevel: ["src/findlib/topfind"] 7 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/opam/ppx_derivers.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | license: "BSD-3-Clause" 5 | homepage: "https://github.com/ocaml-ppx/ppx_derivers" 6 | bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" 7 | dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" 13 | "dune" 14 | ] 15 | synopsis: "Shared [@@deriving] plugin registry" 16 | description: """ 17 | Ppx_derivers is a tiny package whose sole purpose is to allow 18 | ppx_deriving and ppx_type_conv to inter-operate gracefully when linked 19 | as part of the same ocaml-migrate-parsetree driver.""" 20 | url { 21 | src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz" 22 | checksum: "md5=5dc2bf130c1db3c731fe0fffc5648b41" 23 | } 24 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/opam/result.1.4/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/result" 5 | dev-repo: "git+https://github.com/janestreet/result.git" 6 | bug-reports: "https://github.com/janestreet/result/issues" 7 | license: "BSD-3-Clause" 8 | build: [["dune" "build" "-p" name "-j" jobs]] 9 | depends: [ 10 | "ocaml" 11 | "dune" {>= "1.0"} 12 | ] 13 | synopsis: "Compatibility Result module" 14 | description: """ 15 | Projects that want to use the new result type defined in OCaml >= 4.03 16 | while staying compatible with older version of OCaml should use the 17 | Result module defined in this library.""" 18 | url { 19 | src: 20 | "https://github.com/janestreet/result/archive/1.4.tar.gz" 21 | checksum: "md5=d3162dbc501a2af65c8c71e0866541da" 22 | } 23 | -------------------------------------------------------------------------------- /old_ocamls/407/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}" 7 | ], 8 | [ 9 | "make", 10 | "-f", 11 | "configure.make", 12 | "all", 13 | "OCAMLBUILD_PREFIX=#{self.install}", 14 | "OCAMLBUILD_BINDIR=#{self.bin}", 15 | "OCAMLBUILD_LIBDIR=#{self.lib}", 16 | "OCAMLBUILD_MANDIR=#{self.man}", 17 | "OCAMLBUILD_NATIVE=true", 18 | "OCAMLBUILD_NATIVE_TOOLS=true" 19 | ], 20 | [ 21 | "make", 22 | "check-if-preinstalled", 23 | "all", 24 | "#{os == 'windows' ? 'install' : 'opam-install'}" 25 | ] 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /pp/Pp.re: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/pp/Pp.re -------------------------------------------------------------------------------- /pp/dune: -------------------------------------------------------------------------------- 1 | (executable 2 | (name pp) 3 | (public_name pp) 4 | ) -------------------------------------------------------------------------------- /ppx/dune: -------------------------------------------------------------------------------- 1 | 2 | (library 3 | (name Ppx_monads) 4 | (public_name reason-language-server.Ppx_monads) 5 | (flags :standard -w -9) 6 | (libraries compiler-libs ocaml-migrate-parsetree ppx_tools_versioned) 7 | (preprocess (pps ppx_tools_versioned.metaquot_402)) 8 | (kind ppx_rewriter)) 9 | 10 | -------------------------------------------------------------------------------- /process_ocaml/402/Process_402.rei: -------------------------------------------------------------------------------- 1 | 2 | open Compiler_libs_402; 3 | 4 | let fileForCmi: (~moduleName: string, string, string, string => string) => option(SharedTypes.file); 5 | let fileForCmt: (~moduleName: string, string, string, string => string) => result(SharedTypes.file, string); 6 | let fullForCmt: (~moduleName: string, ~allLocations: bool, string, string, string => string) => result(SharedTypes.full, string); 7 | /* let sourceForCmt: string => Belt.Result.t(string, string); */ 8 | let astForCmt: string => Belt.Result.t([`Implementation(Compiler_libs_408.Parsetree.structure) | `Interface(Compiler_libs_408.Parsetree.signature)], string); 9 | -------------------------------------------------------------------------------- /process_ocaml/402/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Process_402) 3 | (public_name reason-language-server.Process_402) 4 | (libraries Belt Current Vendor Util str Compiler_libs_402 Compiler_libs_408 5 | ocaml-migrate-parsetree Core) 6 | (flags :standard -open Vendor -open Util -w -26-32-50-9-27-39-33-35-6-3) 7 | (preprocess 8 | (pps Belt_ppx Ppx_monads))) 9 | -------------------------------------------------------------------------------- /process_ocaml/406/Process_406.rei: -------------------------------------------------------------------------------- 1 | /* open Compiler_libs_406; */ 2 | 3 | let fileForCmi: (~moduleName: string, string, string, string => string) => option(SharedTypes.file); 4 | let fileForCmt: (~moduleName: string, string, string, string => string) => result(SharedTypes.file, string); 5 | let fullForCmt: (~moduleName: string, ~allLocations: bool, string, string, string => string) => result(SharedTypes.full, string); 6 | /* let sourceForCmt: string => Belt.Result.t(string, string); */ 7 | let astForCmt: string => Belt.Result.t([`Implementation(Compiler_libs_408.Parsetree.structure) | `Interface(Compiler_libs_408.Parsetree.signature)], string); 8 | -------------------------------------------------------------------------------- /process_ocaml/406/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Process_406) 3 | (public_name reason-language-server.Process_406) 4 | (libraries Belt Current Vendor Util str Compiler_libs_406 Compiler_libs_408 5 | ocaml-migrate-parsetree Core) 6 | (flags :standard -open Vendor -open Util -w -9) 7 | (preprocess 8 | (pps Belt_ppx Ppx_monads))) 9 | -------------------------------------------------------------------------------- /process_ocaml/407/Process_407.rei: -------------------------------------------------------------------------------- 1 | /* open Compiler_libs_406; */ 2 | 3 | let fileForCmi: (~moduleName: string, string, string, string => string) => option(SharedTypes.file); 4 | let fileForCmt: (~moduleName: string, string, string, string => string) => result(SharedTypes.file, string); 5 | let fullForCmt: (~moduleName: string, ~allLocations: bool, string, string, string => string) => result(SharedTypes.full, string); 6 | /* let sourceForCmt: string => Belt.Result.t(string, string); */ 7 | let astForCmt: string => Belt.Result.t([`Implementation(Compiler_libs_408.Parsetree.structure) | `Interface(Compiler_libs_408.Parsetree.signature)], string); 8 | -------------------------------------------------------------------------------- /process_ocaml/407/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Process_407) 3 | (public_name reason-language-server.Process_407) 4 | (libraries Belt Current Vendor Util str Compiler_libs_407 Compiler_libs_408 5 | Compiler_libs_406 ocaml-migrate-parsetree Core) 6 | (flags :standard -open Vendor -open Util -w -9) 7 | (preprocess 8 | (pps Belt_ppx Ppx_monads))) 9 | -------------------------------------------------------------------------------- /process_ocaml/408/Process_408.rei: -------------------------------------------------------------------------------- 1 | 2 | let fileForCmi: (~moduleName: string, string, string, string => string) => option(SharedTypes.file); 3 | let fileForCmt: (~moduleName: string, string, string, string => string) => result(SharedTypes.file, string); 4 | let fullForCmt: (~moduleName: string, ~allLocations: bool, string, string, string => string) => result(SharedTypes.full, string); 5 | /* let sourceForCmt: string => Belt.Result.t(string, string); */ 6 | let astForCmt: string => Belt.Result.t([`Implementation(Parsetree.structure) | `Interface(Parsetree.signature)], string); 7 | -------------------------------------------------------------------------------- /process_ocaml/408/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Process_408) 3 | (public_name reason-language-server.Process_408) 4 | (libraries Belt Current Vendor Util str Compiler_libs_407 Compiler_libs_408 5 | Compiler_libs_406 Core) 6 | (flags :standard -open Vendor -open Util -w -9) 7 | (preprocess 8 | (pps Belt_ppx Ppx_monads))) 9 | -------------------------------------------------------------------------------- /process_ocaml/build.sh: -------------------------------------------------------------------------------- 1 | set -e 2 | node ../pp/pp.js 408 -408 base/* 3 | node ../pp/pp.js 407 -407 base/* 4 | node ../pp/pp.js 406 -406 base/* 5 | node ../pp/pp.js 402 -402 base/* 6 | -------------------------------------------------------------------------------- /reason-language-server.opam: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/reason-language-server.opam -------------------------------------------------------------------------------- /release.sh: -------------------------------------------------------------------------------- 1 | 2 | # (cp lib/bs/native/bin.native client; cd client; vsce package); 3 | 4 | rm -rf _zip 5 | mkdir -p _zip/reason-language-server 6 | cd _zip 7 | 8 | chmod +x ../editor-extensions/vscode/bin.native 9 | chmod +x ../editor-extensions/vscode/bin.native.exe 10 | chmod +x ../editor-extensions/vscode/bin.native.linux 11 | 12 | cp ../editor-extensions/vscode/bin.native reason-language-server/reason-language-server.exe 13 | chmod +x reason-language-server/reason-language-server.exe 14 | zip -r ../editor-extensions/vscode/macos.zip reason-language-server 15 | 16 | cp ../editor-extensions/vscode/bin.native.linux reason-language-server/reason-language-server.exe 17 | chmod +x reason-language-server/reason-language-server.exe 18 | zip -r ../editor-extensions/vscode/linux.zip reason-language-server 19 | 20 | cp ../editor-extensions/vscode/bin.native.exe reason-language-server/reason-language-server.exe 21 | chmod +x reason-language-server/reason-language-server.exe 22 | zip -r ../editor-extensions/vscode/windows.zip reason-language-server 23 | 24 | cd .. 25 | rm -rf _zip -------------------------------------------------------------------------------- /relite/Example.re: -------------------------------------------------------------------------------- 1 | // let root = Suite.root(); 2 | // let describe = Suite.describe(root); 3 | let {Relite.describe, run} = Relite.init(); 4 | 5 | describe.withLifecycle( 6 | "A", 7 | { 8 | beforeAll: () => 10, 9 | beforeEach: num => {string_of_int(num)}, 10 | afterEach: (s: string) => (), 11 | afterAll: (x: int) => (), 12 | }, 13 | ({it, describe}) => { 14 | it("a1", ({expect, ctx}) => { 15 | expect.string(ctx).toEqual("10") 16 | }); 17 | 18 | describe.withLifecycle( 19 | "B", 20 | { 21 | beforeAll: aAll => aAll * 2, 22 | beforeEach: num => {string_of_int(num)}, 23 | afterEach: (s: string) => (), 24 | afterAll: (x: int) => (), 25 | }, 26 | ({it}) => { 27 | it("b1", ({expect, ctx}) => { 28 | expect.string(ctx).toEqual("20") 29 | }) 30 | it("b2", ({expect, ctx}) => { 31 | expect.string(ctx).toEqual("10") 32 | }) 33 | }); 34 | () 35 | }); 36 | 37 | print_endline("Relite example:") 38 | // Runner.run(~report=Reporter.report, expect, root) 39 | run(); -------------------------------------------------------------------------------- /relite/Expect.re: -------------------------------------------------------------------------------- 1 | open Types; 2 | 3 | let default = { 4 | string: actual => { 5 | toEqual: (~message=?, expected) => 6 | if (actual != expected) { 7 | failwith( 8 | Printf.sprintf( 9 | "Expected \"%s\" to equal \"%s\" : %s", 10 | actual, 11 | expected, 12 | switch (message) { 13 | | None => "" 14 | | Some(m) => m 15 | }, 16 | ), 17 | ); 18 | }, 19 | }, 20 | int: actual => { 21 | toEqual: (~message=?, expected) => 22 | if (actual != expected) { 23 | failwith( 24 | Printf.sprintf( 25 | "Expected %d to equal %d : %s", 26 | actual, 27 | expected, 28 | switch (message) { 29 | | None => "" 30 | | Some(m) => m 31 | }, 32 | ), 33 | ); 34 | }, 35 | }, 36 | }; 37 | -------------------------------------------------------------------------------- /relite/Files.re: -------------------------------------------------------------------------------- 1 | 2 | let maybeStat = (path) => 3 | try (Some(Unix.stat(path))) { 4 | | Unix.Unix_error(Unix.ENOENT, _, _) => None 5 | }; 6 | 7 | let getMtime = path => switch (maybeStat(path)) { 8 | | Some({Unix.st_mtime}) => Some(st_mtime) 9 | | _ => None 10 | }; 11 | 12 | let readFile = path => { 13 | switch (maybeStat(path)) { 14 | | Some({Unix.st_kind: Unix.S_REG}) => 15 | let ic = open_in(path); 16 | let try_read = () => 17 | switch (input_line(ic)) { 18 | | exception End_of_file => None 19 | | x => Some(x) 20 | }; 21 | let rec loop = (acc) => 22 | switch (try_read()) { 23 | | Some(s) => loop([s, ...acc]) 24 | | None => 25 | close_in(ic); 26 | List.rev(acc) 27 | }; 28 | let text = loop([]) |> String.concat(String.make(1, '\n')); 29 | Some(text) 30 | | _ => None 31 | } 32 | }; 33 | 34 | let writeFile = (path, contents) => { 35 | try { 36 | let out = open_out(path); 37 | output_string(out, contents); 38 | close_out(out); 39 | true 40 | } { 41 | | _ => false 42 | } 43 | }; -------------------------------------------------------------------------------- /relite/dune: -------------------------------------------------------------------------------- 1 | (executable 2 | (public_name Relite.exe) 3 | (name Example) 4 | (modules Example) 5 | (flags :standard -w -9 -w -30 -w -27) 6 | (libraries Belt Relite) 7 | (preprocess (pps Belt_ppx))) 8 | 9 | (library 10 | (name Relite) 11 | (libraries Belt unix str) 12 | (modules :standard \ Example) 13 | (flags :standard -w -9 -w -30 -w -27) 14 | (preprocess (pps Belt_ppx))) -------------------------------------------------------------------------------- /runtests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ex 3 | esy 4 | # We need to run the binary outside of the esy env. 5 | cp $(esy x which RunTests.exe) RunTests.exe 6 | ./RunTests.exe -------------------------------------------------------------------------------- /src/analyze/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Analyze) 3 | (public_name reason-language-server.Analyze) 4 | (libraries Belt Vendor str Process_402 Process_406 Process_407 Process_408 5 | Core Util) 6 | (flags :standard -open Vendor -open Util -w -9) 7 | (preprocess 8 | (pps Belt_ppx Ppx_monads))) 9 | -------------------------------------------------------------------------------- /src/analyze_example_tests/dune: -------------------------------------------------------------------------------- 1 | 2 | (library 3 | (name ExamplesTests) 4 | (modules ExamplesTests) 5 | (libraries Belt str Core Util Analyze rely.lib TestFramework) 6 | (flags :standard -open Util -w -9) 7 | (preprocess (pps Belt_ppx Ppx_monads)) 8 | ) 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/analyze_fixture_tests/TestCodeLens.re: -------------------------------------------------------------------------------- 1 | 2 | open SharedTypes; 3 | 4 | let getOutput = (~projectDir, files, text) => { 5 | let (_state, _package, _cmt, full) = TestUtils.setUp(~projectDir, files, text); 6 | 7 | let opens = CodeLens.forOpens(full.extra); 8 | 9 | opens |> List.map(((item, loc)) => { 10 | "line " ++ string_of_int(loc.Location.loc_start.pos_lnum) ++ ": " ++ item 11 | }) |> String.concat("\n"); 12 | }; 13 | 14 | let name = "TestCodeLens"; -------------------------------------------------------------------------------- /src/analyze_fixture_tests/TestCodeLens.txt: -------------------------------------------------------------------------------- 1 | === Basic 2 | module One = { 3 | let x = 10; 4 | }; 5 | open One; 6 | let y = x; 7 | --> 8 | line 4: 1 uses. values: {x} 9 | 10 | === Nested with include 11 | module Two = { 12 | let y = 30; 13 | }; 14 | module One = { 15 | let x = 10; 16 | include Two; 17 | }; 18 | open One; 19 | let z = y + x; 20 | --> 21 | line 8: 2 uses. values: {x, y} 22 | 23 | === Local open 24 | module One = { 25 | let x = 10; 26 | }; 27 | let _ = { 28 | open One; 29 | let y = x; 30 | }; 31 | --> 32 | line 5: 1 uses. values: {x} 33 | 34 | === Multiple 35 | module One = { 36 | let x = 10; 37 | }; 38 | module Two = { 39 | let y = 30; 40 | }; 41 | open One; 42 | open Two; 43 | let r = x + y; 44 | --> 45 | line 7: 1 uses. values: {x} 46 | line 8: 1 uses. values: {y} 47 | -------------------------------------------------------------------------------- /src/analyze_fixture_tests/TestHover.txt: -------------------------------------------------------------------------------- 1 | === Basics 2 | let f1 = (a, b) => a + b; 3 | let f2 = ((a, b)) => a + b; 4 | let f3 = (a, b) => (a, b); 5 | let f4 = (a, b) => [a, b]; 6 | let f5 = a => a + 1; 7 | --> 8 | 1: (int, int) => int 9 | 10 | /Test.re 11 | 2: ((int, int)) => int 12 | 13 | /Test.re 14 | 3: ('a, 'b) => ('a, 'b) 15 | 16 | /Test.re 17 | 4: ('a, 'a) => list('a) 18 | 19 | /Test.re 20 | 5: int => int 21 | 22 | /Test.re 23 | -------------------------------------------------------------------------------- /src/analyze_fixture_tests/TestJbuildFile.re: -------------------------------------------------------------------------------- 1 | let getOutput = (~projectDir, _files, text) => 2 | try ( 3 | "PASS: " 4 | ++ ( 5 | JbuildFile.parse(text) 6 | |> List.map(JbuildFile.atomToString) 7 | |> String.concat("\n") 8 | ) 9 | ) { 10 | | _ => "FAIL" 11 | }; 12 | 13 | let name = "TestJbuildFile"; 14 | -------------------------------------------------------------------------------- /src/analyze_fixture_tests/TestJbuildFile.txt: -------------------------------------------------------------------------------- 1 | === Flags 2 | (jbuild_version 1) 3 | 4 | (library 5 | ((name MyLib) 6 | (flags (:standard "-open" "Containers")) 7 | (library_flags (-linkall)))) 8 | --> 9 | PASS: [jbuild_version, 1.] 10 | [library, [[name, MyLib], [flags, [:standard, "-open", "Containers"]], [library_flags, [-linkall]]]] 11 | -------------------------------------------------------------------------------- /src/analyze_fixture_tests/dune: -------------------------------------------------------------------------------- 1 | (include_subdirs unqualified) 2 | 3 | (library 4 | (name AnalyzeFixtureTests) 5 | (libraries Belt str Core Util Analyze rely.lib TestFramework Relite) 6 | (flags :standard -open Analyze -open Util -w -9) 7 | (preprocess (pps Belt_ppx Ppx_monads)) 8 | ) 9 | -------------------------------------------------------------------------------- /src/full_tests/dune: -------------------------------------------------------------------------------- 1 | (executable (public_name FullTests) 2 | (libraries Belt str Core Util Analyze) 3 | (flags :standard -open Analyze -open Util -w -9) 4 | (preprocess (pps Belt_ppx Ppx_monads)) 5 | ) -------------------------------------------------------------------------------- /src/lsp/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Lsp) 3 | (libraries Analyze Belt Vendor str Process_402 Process_406 Process_407 4 | Process_408 Core Util reason ocaml-migrate-parsetree) 5 | (flags :standard -open Vendor -open Util -open Analyze -w -9) 6 | (preprocess 7 | (pps Belt_ppx Ppx_monads))) 8 | -------------------------------------------------------------------------------- /test/RunTests.re: -------------------------------------------------------------------------------- 1 | include ExamplesTests; 2 | include AnalyzeFixtureTests; 3 | include UtilTests; 4 | print_endline("After utilTests, ready for cli"); 5 | TestFramework.run() 6 | 7 | // Things I wish rely would do: 8 | // - watch mode would be awesome 9 | // - allow you to select a subset of the tests to run, from cli args 10 | // - allow you to nest describes with beforeEach n stuff 11 | // - display the sub-items of a describe as they're being run (at least sub-describes) 12 | // - it would be fine to use readline to replace them one after another, but I just want 13 | // feedback that things are happening. -------------------------------------------------------------------------------- /test/TestFramework.re: -------------------------------------------------------------------------------- 1 | 2 | let {Relite.describe, run} = Relite.init(); 3 | -------------------------------------------------------------------------------- /test/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name TestFramework) 3 | (modules TestFramework) 4 | (libraries Relite)) 5 | 6 | (executable 7 | (name RunTests) 8 | (public_name RunTests.exe) 9 | (modules RunTests) 10 | (libraries UtilTests ExamplesTests AnalyzeFixtureTests )) 11 | -------------------------------------------------------------------------------- /unexceptional/Readme.md: -------------------------------------------------------------------------------- 1 | # Unexceptional 2 | 3 | Exception tracking for OCaml. 4 | 5 | ## Usage: 6 | 7 | - put `[@pure]` on function definitions that you want to verify does not leek any exceptions 8 | - this will verify that 9 | 10 | 1. Any functions that are called from this function are either also pure, or their exceptions are caught via a switch / try 11 | 2. If this function calls any functions that it gets as arguments, it is never called with functions that will raise unhandled exceptions. 12 | -------------------------------------------------------------------------------- /unexceptional/tests/basic.re: -------------------------------------------------------------------------------- 1 | 2 | let throwsFailure = () => failwith("Nope"); 3 | 4 | exception MyCustomException; 5 | 6 | let throwsCustom = () => if (true) {raise(MyCustomException)} else { 10 }; 7 | 8 | [@expectFailure] 9 | [@pure] 10 | let doesntCatch = () => throwsCustom(); 11 | 12 | [@pure] 13 | let catches = () => switch (throwsCustom()) { 14 | | exception MyCustomException => 5 15 | | m => m 16 | }; 17 | 18 | [@pure] 19 | let alsoCatches = () => try (throwsCustom()) { 20 | | MyCustomException => 5 21 | }; 22 | 23 | [@expectFailure] 24 | [@pure] 25 | let d = (m) => if m { 26 | throwsFailure() 27 | } else { 28 | throwsCustom() 29 | }; 30 | 31 | [@pure] 32 | let callsArgument = fn => fn(); 33 | 34 | let passingImpureFunction = { 35 | [@expectFailure]callsArgument(throwsFailure); 36 | }; 37 | 38 | let passingPureFunction = { 39 | ignore(callsArgument(() => 5)) 40 | }; 41 | 42 | [@pure] 43 | let callsCatchesFailure = fn => try (fn()) { 44 | | exception Failure(_) => 10 45 | }; 46 | 47 | let passingFailureCaller = { 48 | callsCatchesFailure(throwsFailure) 49 | }; 50 | 51 | let passingOtherCaller = { 52 | [@expectFailure]callsCatchesFailure(throwsCustom) 53 | }; 54 | 55 | 56 | -------------------------------------------------------------------------------- /util/JsonShort.re: -------------------------------------------------------------------------------- 1 | 2 | open Json; 3 | let o = o => Object(o); 4 | let s = s => String(s); 5 | let n = n => Number(n); 6 | let i = i => Number(float_of_int(i)); 7 | let l = l => Array(l); 8 | let t = True; 9 | let f = False; 10 | let null = Null; 11 | -------------------------------------------------------------------------------- /util/Log.re: -------------------------------------------------------------------------------- 1 | let out = ref(None); 2 | 3 | let initial_dest = Filename.concat(Filename.get_temp_dir_name(), "lsp.log"); 4 | out := Some(open_out(initial_dest)); 5 | 6 | let setLocation = (location) => { 7 | switch out^ { 8 | | None => () 9 | | Some(out) => close_out(out) 10 | }; 11 | output_string(stderr, "Setting log location: " ++ location ++ "\n"); 12 | flush(stderr); 13 | out := Some(open_out(location)) 14 | }; 15 | 16 | let spamError = ref(false); 17 | 18 | let log = (msg) => 19 | switch out^ { 20 | | None => () 21 | | Some(out) => 22 | output_string(out, msg ++ "\n"); 23 | if (spamError^) { 24 | output_string(stderr, msg ++ "\n"); 25 | flush(stderr) 26 | }; 27 | flush(out) 28 | }; -------------------------------------------------------------------------------- /util/ModuleResolution.re: -------------------------------------------------------------------------------- 1 | open Infix; 2 | 3 | let rec resolveNodeModulePath = (~startPath=".", name) => { 4 | let path = startPath /+ "node_modules" /+ name; 5 | switch (startPath) { 6 | | "/" => Files.exists(path) ? Some(path) : None 7 | | _ => 8 | Files.exists(path) ? 9 | Some(path) : 10 | resolveNodeModulePath(~startPath=Filename.dirname(startPath), name) 11 | }; 12 | }; -------------------------------------------------------------------------------- /util/RJson.re: -------------------------------------------------------------------------------- 1 | 2 | let get = (k, obj) => Json.get(k, obj) |> RResult.orError("No key " ++ k); 3 | let string = (obj) => Json.string(obj) |> RResult.orError("Not a string"); 4 | let number = (obj) => Json.number(obj) |> RResult.orError("Not a number"); 5 | let array = obj => Json.array(obj) |> RResult.orError("Expected an array"); 6 | let obj = obj => Json.obj(obj) |> RResult.orError("Expected an object"); 7 | let bool = obj => Json.bool(obj) |> RResult.orError("Expected a boolean"); 8 | 9 | let extend = (obj) => Json.obj(obj) |> RResult.orError("Expected an object") -------------------------------------------------------------------------------- /util/RResult.re: -------------------------------------------------------------------------------- 1 | 2 | type result('ok, 'error) = Belt.Result.t('ok, 'error) = Ok('ok) | Error('error); 3 | 4 | let resultOfOption = (err, v) => switch v { | Some(v) => Ok(v) | None => Error(err)}; 5 | let orError = resultOfOption; 6 | 7 | let toOptionAndLog = err => switch err { 8 | | Error(e) => Log.log(e); None 9 | | Ok(v) => Some(v) 10 | }; 11 | 12 | module InfixResult = { 13 | let (|?>) = (a, fn) => switch a { | Ok(a) => fn(a) | Error(e) => Error(e) }; 14 | let (|.>) = (fa, fb, value) => fb(fa(value)); 15 | let (|?>>) = (a, fn) => switch a { | Ok(a) => Ok(fn(a)) | Error(e) => Error(e) }; 16 | let (|?) = (a, default) => switch a { | Ok(a) => a | Error(_) => default }; 17 | let (|!) = (a, message) => switch a { | Ok(a) => a | Error(_) => failwith(message) }; 18 | }; 19 | open InfixResult; 20 | let withDefault = (d, v) => v |? d; 21 | let map = (fn, r) => r |?>> fn; 22 | let bind = (fn, r) => r |?> fn; -------------------------------------------------------------------------------- /util/Result.re: -------------------------------------------------------------------------------- 1 | 2 | type result('ok, 'error) = Belt.Result.t('ok, 'error) = Ok('ok) | Error('error); 3 | 4 | let resultOfOption = (err, v) => switch v { | Some(v) => Ok(v) | None => Error(err)}; 5 | let orError = resultOfOption; 6 | 7 | let toOptionAndLog = err => switch err { 8 | | Error(e) => Log.log(e); None 9 | | Ok(v) => Some(v) 10 | }; 11 | 12 | module InfixResult = { 13 | let (|?>) = (a, fn) => switch a { | Ok(a) => fn(a) | Error(e) => Error(e) }; 14 | let (|.>) = (fa, fb, value) => fb(fa(value)); 15 | let (|?>>) = (a, fn) => switch a { | Ok(a) => Ok(fn(a)) | Error(e) => Error(e) }; 16 | let (|?) = (a, default) => switch a { | Ok(a) => a | Error(_) => default }; 17 | let (|!) = (a, message) => switch a { | Ok(a) => a | Error(_) => failwith(message) }; 18 | }; 19 | open InfixResult; 20 | let withDefault = (d, v) => v |? d; 21 | let map = (fn, r) => r |?>> fn; 22 | let bind = (fn, r) => r |?> fn; -------------------------------------------------------------------------------- /util/Semver.rei: -------------------------------------------------------------------------------- 1 | type t; 2 | 3 | let none: t; 4 | 5 | let parse: string => t; 6 | 7 | let major: t => string; 8 | let minor: t => string; 9 | let patch: t => string; 10 | let metadata: t => string; -------------------------------------------------------------------------------- /util/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name Util) 3 | (public_name reason-language-server.Util) 4 | (libraries Belt Vendor str uri) 5 | (flags :standard -open Vendor -w -9) 6 | (preprocess (pps Belt_ppx Ppx_monads)) 7 | ) 8 | -------------------------------------------------------------------------------- /util_tests/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name UtilTests) 3 | (libraries Util rely.lib TestFramework) 4 | ) -------------------------------------------------------------------------------- /vendor/dune: -------------------------------------------------------------------------------- 1 | (include_subdirs unqualified) 2 | 3 | (library 4 | (name Vendor) 5 | (public_name reason-language-server.Vendor) 6 | (flags :standard -w -A) 7 | (libraries compiler-libs.common bigarray) 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/odoc_parser/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Thomas Refis trefis@janestreet.com Copyright (c) 2014, 2015 Leo White leo@lpw25.net Copyright (c) 2015 David Sheets sheets@alum.mit.edu 2 | 3 | Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 4 | 5 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- /vendor/odoc_parser/Readme.md: -------------------------------------------------------------------------------- 1 | The source code in this directory was taken, with some modifications from the `odoc` project (https://github.com/ocaml/odoc/tree/master/src/parser). 2 | 3 | It is under the ISC license. -------------------------------------------------------------------------------- /vendor/odoc_parser/odoc_lexer.mli: -------------------------------------------------------------------------------- 1 | type input = { 2 | file : string; 3 | offset_to_location : int -> Location_.point; 4 | lexbuf : Lexing.lexbuf; 5 | } 6 | 7 | val token : input -> Lexing.lexbuf -> Token.t Location_.with_location 8 | -------------------------------------------------------------------------------- /vendor/odoc_parser/parser_.mli: -------------------------------------------------------------------------------- 1 | type sections_allowed = Ast.sections_allowed 2 | 3 | val parse_comment : 4 | permissive:bool -> 5 | sections_allowed:sections_allowed -> 6 | containing_definition:Paths.Identifier.label_parent -> 7 | location:Lexing.position -> 8 | text:string -> 9 | ((Comment.docs, Error.t) Error.result) Error.with_warnings 10 | 11 | (** Converts fatal errors to warnings for now, by emitting a blank comment. This 12 | is a temporary measure, because the code that drives the parser does not yet 13 | have proper error handling written. *) 14 | val errors_to_warnings : 15 | ((Comment.docs, Error.t) Error.result) Error.with_warnings -> 16 | ((Comment.docs, Error.t) Error.result) Error.with_warnings 17 | -------------------------------------------------------------------------------- /vendor/odoc_parser/semantics.mli: -------------------------------------------------------------------------------- 1 | val ast_to_comment : 2 | permissive:bool -> 3 | sections_allowed:Ast.sections_allowed -> 4 | parent_of_sections:Paths.Identifier.label_parent -> 5 | Ast.docs -> 6 | ((Comment.docs, Error.t) Error.result) Error.with_warnings 7 | -------------------------------------------------------------------------------- /vendor/odoc_parser/syntax.mli: -------------------------------------------------------------------------------- 1 | val parse : 2 | (Token.t Location_.with_location) Stream.t -> 3 | (Ast.docs, Error.t) Error.result 4 | -------------------------------------------------------------------------------- /vendor/omd/Readme.md: -------------------------------------------------------------------------------- 1 | The source code in this directory was taken, with some modifications, from the `omd` project (https://github.com/ocaml/omd/tree/master/src). 2 | 3 | It is under the ISC license. -------------------------------------------------------------------------------- /vendor/omd/omd_types.ml: -------------------------------------------------------------------------------- 1 | 2 | type name = string 3 | type url = string 4 | type title = string 5 | type alt = string 6 | 7 | type 'a el = 8 | [ `Text of string 9 | | `Br 10 | | `Emph of 'a 11 | | `Bold of 'a 12 | | `Url of url * 'a * title 13 | | `Img of url * alt * title 14 | | `Code of name * string 15 | | `Html of string 16 | | `Comment of string 17 | ] 18 | 19 | type phrasing_no_NL = phrasing_no_NL el list 20 | 21 | type phrasing = [phrasing el | `NL] list 22 | 23 | type reference 24 | 25 | type flow = 26 | [ phrasing el 27 | | `H1 of phrasing_no_NL 28 | | `H2 of phrasing_no_NL 29 | | `H3 of phrasing_no_NL 30 | | `H4 of phrasing_no_NL 31 | | `H5 of phrasing_no_NL 32 | | `H6 of phrasing_no_NL 33 | | `Hr 34 | | `Paragraph of phrasing 35 | | `Code_block of name * string 36 | | `Html_block of string 37 | | `Ul of t 38 | | `Ol of t 39 | | `Quote of t 40 | | `Ref of reference 41 | | `Img_ref of reference 42 | ] 43 | 44 | and t = flow list 45 | -------------------------------------------------------------------------------- /vendor/omd/omd_xtxt.ml: -------------------------------------------------------------------------------- 1 | (***********************************************************************) 2 | (* omd: Markdown frontend in OCaml *) 3 | (* (c) 2013 by Philippe Wang *) 4 | (* Licence : ISC *) 5 | (* http://www.isc.org/downloads/software-support-policy/isc-license/ *) 6 | (***********************************************************************) 7 | 8 | (* xtxt = eXTernal eXTension *) 9 | 10 | (* let extensions = ref [] *) 11 | 12 | (* let get () = *) 13 | (* !extensions *) 14 | 15 | (* let register e = *) 16 | (* extensions := e :: !extensions *) 17 | 18 | (* let set es = extensions := es *) 19 | 20 | (* let activate ... *) 21 | 22 | (* (\* let deactivate ... *\) *) 23 | 24 | (* priority (integer?) *) 25 | (* pre-extension *) 26 | (* post-extension *) 27 | 28 | 29 | -------------------------------------------------------------------------------- /vendor/omd/omd_xtxt.mli: -------------------------------------------------------------------------------- 1 | (***********************************************************************) 2 | (* omd: Markdown frontend in OCaml *) 3 | (* (c) 2013 by Philippe Wang *) 4 | (* Licence : ISC *) 5 | (* http://www.isc.org/downloads/software-support-policy/isc-license/ *) 6 | (***********************************************************************) 7 | 8 | (** xtxt = eXTernal eXTension *) 9 | 10 | --------------------------------------------------------------------------------