Skip to content

Instantly share code, notes, and snippets.

@Nymphium
Created August 24, 2020 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nymphium/935e747d08067e9958c0c097285fa70d to your computer and use it in GitHub Desktop.
Save Nymphium/935e747d08067e9958c0c097285fa70d to your computer and use it in GitHub Desktop.
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