o1-labs / ocamlbyexample

Learn Ocaml by reading code examples
https://o1-labs.github.io/ocamlbyexample/
69 stars 4 forks source link

first order modules #19

Open mimoo opened 1 year ago

mimoo commented 1 year ago
module A = struct
  type t = int
end

module type A = module type of A

let a = (module A : A)

module B = (val a : A)

module C = (val a)