Source file name_and_loc.ml

1
2
3
4
5
6
7
8
9
10
open! Core0

type t =
  { name : string
  ; loc : Source_code_position.t
  }
[@@deriving bin_io, hash, compare ~localize, equal ~localize]

(* Custom implementation to generate a compact representation for the type. *)
let sexp_of_t { name; loc } = [%sexp ((name, loc) : string * Source_code_position.t)]