package fmlib_parse

  1. Overview
  2. Docs

Source file located.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
type 'a t = Position.range * 'a


let make (r: Position.range) (a: 'a): 'a t =
    r, a


let range (loc: 'a t): Position.range =
    fst loc


let value (loc: 'a t): 'a =
    snd loc


let start (loc: 'a t): Position.t =
    fst (fst loc)


let _end (loc: 'a t): Position.t =
    snd (fst loc)


let map (f: 'a -> 'b) (loc: 'a t): 'b t =
    make (range loc) (value loc |> f)
OCaml

Innovation. Community. Security.