Skip to content

Instantly share code, notes, and snippets.

@EduardoRFS
Created April 5, 2021 19:07
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 EduardoRFS/de96838cefe9115d12ec740b78e8506b to your computer and use it in GitHub Desktop.
Save EduardoRFS/de96838cefe9115d12ec740b78e8506b to your computer and use it in GitHub Desktop.
module X = struct
type record = { field: int }
let value = { field = 1 }
end
(* this works *)
let field =
match X.value with
| {field; _} -> field
(* this fails *)
let { field; _ } = X.value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment