File: loc.ml

package info (click to toggle)
ppxlib 0.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,284 kB
  • sloc: ml: 17,184; sh: 149; makefile: 36; python: 36
file content (12 lines) | stat: -rw-r--r-- 184 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
open! Import

type 'a t = 'a loc =
  { txt : 'a
  ; loc : Location.t
  }

let txt t = t.txt
let loc t = t.loc

let make ~loc txt = { loc; txt }
let map t ~f = { t with txt = f t.txt }