blob: acc3e49514f141a3911c3348c6897e9273ef139a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
type t = string
let is_lower c = c >= 'a' && c <= 'z'
let is_body c =
is_lower c || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c = '_'
let well_formed s =
String.length s > 0
&& is_lower s.[0]
&& String.for_all is_body s
let of_string s = if well_formed s then Ok s else Error (`Invalid_label s)
let to_string t = t
let equal = String.equal
let compare = String.compare
let pp fmt t = Format.fprintf fmt "%s:" t
module Map = Map.Make (String)
|