Skip to content

Instantly share code, notes, and snippets.

@wweic
Created January 1, 2014 16:09
Show Gist options
  • Save wweic/8209136 to your computer and use it in GitHub Desktop.
Save wweic/8209136 to your computer and use it in GitHub Desktop.
OCaml typing weirdness
type atype = {a : int}
type btype = {a : int; b : int}
let accept {a = x} = x
(*
---> val accept : btype -> int = <fun>
select the last record type which contains the fields
*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment