Skip to content

Instantly share code, notes, and snippets.

@awreece
Last active December 10, 2015 04:48
Show Gist options
  • Save awreece/4383713 to your computer and use it in GitHub Desktop.
Save awreece/4383713 to your computer and use it in GitHub Desktop.
module DJV = struct
type t = { level: int; vertex: string }
let vertex v = v.vertex
let level v = v.level
end
let _ = print_string (DJV.vertex DJV.({ level=0; vertex="hello, world\n" }))
$ ocaml temp.ml
File "temp.ml", line 8, characters 35-40:
Error: Unbound record field label level
module DJV = struct
type t = { level: int; vertex: string }
let vertex v = v.vertex
let level v = v.level
end
let _ = print_string (DJV.vertex { level=0; vertex="hello, world\n" })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment