Skip to content

Instantly share code, notes, and snippets.

@qexat
Created January 20, 2026 09:38
Show Gist options
  • Select an option

  • Save qexat/425154ff3849707bf8feb158d6fb38b6 to your computer and use it in GitHub Desktop.

Select an option

Save qexat/425154ff3849707bf8feb158d6fb38b6 to your computer and use it in GitHub Desktop.
they differ by their runtime size :0
(* boilerplate *)
module type T = sig
type t
end
module type INT = module type of Int
(* the goofy type *)
type 'a t = What of < value : 'a; ty : 'c > constraint 'c = (module T with type t = 'a)
(* the ill-typed term *)
let _ = What (object method value = 3 method ty = (module Int : INT) end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment