Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Recursive types in nested modules

$
0
0

Hello,

I would need to create bindings for recursive types, but I want the types to be in a separate module:

module Foo = {
  module A = {
    type t = {b: B.t} // Gives error
  }

  module B = {
    type t = {a: A.t}
  }
}

Can I do this in ReScript? If not, how to work around this?


Viewing all articles
Browse latest Browse all 2592

Trending Articles