Skip to content

Instantly share code, notes, and snippets.

@Nymphium
Created Aug 24, 2020
Embed
What would you like to do?
module type S = sig val x: int end
let module M = struct let x = 3 end in
Obj.magic (module M : S) |> fun m -> let module M = (val m : S) in M.x (* 3 *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment