Docs for type related syntax

Hello Everyone,

Hope all is well.

I am trying to get my hands on Rescript but I got really confused regarding the language features so far, especially regarding types related syntax.

So here are the specific questions I got.

  1. Does OCaml features and constructions works in Rescript? If yes, what is the latest version of OCaml I can use?
  2. I am not able to find any docs related to defining and working with types. I.e. How to define product/coproduct,? Working with generics, recursive data structures etc…

I would really appreciate if someone would point me to some docs on the matter.

Thank you

Hi @yazla
https://rescript-lang.org/docs/manual/latest/type This page is about generics, recursive types
For each type eg: tuple, record, variant, etc there is a corresponding page in the docs.
eg: https://rescript-lang.org/docs/manual/latest/tuple for tuple

3 Likes
  1. OCaml features / constructions / syntax work in ReScript, with some exceptions, e.g. ReScript is in the process of switching off OCaml’s OOP functionality (inheritance, etc.). Objects will still continue to work however. Aside from that, ReScript is based on OCaml 4.06.
2 Likes

Thanks a lot for the links. It is exactly what I need.

Just curious why these docs are not available from the docs webpage but only using the direct links that you sent?
Or am I missing something?

Thanks for the explanation, it helps a lot.
Are there any plans to upgrade to a more recent version?

They are available. Try this flow.
Docs -> Language manual -> Language feature.
cc: @ryyppy

Oh, shame on me. I am using mobile, and all these stuff appeared to be in the side navigation which was not obvious for me for some reason.

Sorry about that.

Thanks a lot for your work.

Check the roadmap for future plans here: https://github.com/rescript-lang/rescript-compiler/wiki