Interface Files for Nested modules

I’m trying to create an interface file for an implementation file that contains a nested module. Here is a distilled copy of my implementation file Foobar.res:

Is it possible to write Foobar.resi such that the Foobar module exposes Foobar.Bar?

Hi @lgrier

You can use a command to generate interface files:

npx  bsc -i src/Foobar.res > src/Foobar.resi

For your example it would look something like this:

// Foobar.resi

module Bar: {
  type t = int

type t = Foo | Bar(Bar.t)

thanks for the awesome information.