something like that:
module MakeScene = (
Specification: {
type scenes = private string
},
) => {
external scene: (Specification.scenes, 'a => unit) => unit = "scene"
external go: (Specification.scenes, ~data: 'a=?) => unit = "go"
}
module Spec1: {
type scenes = private string
let one: scenes
let two: scenes
} = {
type scenes = string
let one = "one"
let two = "two"
}
module Scene1 = MakeScene(Spec1)
Scene1.scene(Spec1.one, _val => ())
Scene1.go("other") // compiler error!