Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add "seg" to identifiers

  • Loading branch information...
commit 5d438ee556062f6cffe9c3574915ab5d946ff7aa 1 parent b201f0b
@VictorNicollet authored
Showing with 6 additions and 1 deletion.
  1. +3 −1 src/id.ml
  2. +3 −0  src/id.mli
View
4 src/id.ml
@@ -19,6 +19,7 @@ let length = 11
let smallest = ""
let largest = String.make length 'z'
+let seg = identity, identity
let arg = identity, (fun x -> Some x)
let next_char = function
@@ -62,7 +63,7 @@ module Phantom = struct
let fmt = fmt
let arg = identity, (fun x -> Some x)
-
+ let seg = identity, identity
end
module type PHANTOM = sig
@@ -89,5 +90,6 @@ module type PHANTOM = sig
val decay : 'any id -> t
val arg : (t -> string) * (string -> t option)
+ val seg : (t -> string) * (string -> t)
end
View
3  src/id.mli
@@ -143,6 +143,7 @@ val largest : t
val next : t -> t
val arg : (t -> string) * (string -> t option)
+val seg : (t -> string) * (string -> t)
(** The type of a strongly typed identifier module. These modules define a new identifier type tagged
with a type parameter that carries additional information about the identifier. The new identifier
@@ -181,6 +182,7 @@ module type PHANTOM = sig
val decay : 'any id -> t
val arg : (t -> string) * (string -> t option)
+ val seg : (t -> string) * (string -> t)
end
@@ -208,5 +210,6 @@ module Phantom : sig
val of_string : string -> t
val arg : (t -> string) * (string -> t option)
+ val seg : (t -> string) * (string -> t)
end
Please sign in to comment.
Something went wrong with that request. Please try again.