Commits

camlspotter committed a9f7501

new spotlib

  • Participants
  • Parent commits b84d6be

Comments (0)

Files changed (2)

   type t = char
   let show = Printf.sprintf "%C"
   let format ppf = Format.fprintf ppf "%C"
-  let equal (x : char) y = x = y
-  let compare (x : char) y = compare x y
+  include Mtypes.Make_comparable(struct
+    type t = char
+    let compare (x : char) y = compare x y
+  end)
 end

File lib/sstring.ml

+open Spotlib.Spot
+
 include Pstream.Make(struct
   module Pos = Position.None
   module Attr = struct
     type t = string
     let show = Printf.sprintf "%S"
     let format ppf = Format.fprintf ppf "%S"
-    let equal (x : string) y = x = y
-    let compare (x : string) y = compare x y
     let position _ = Position.None.none
+    include Mtypes.Make_comparable(struct
+      type t = string
+      let compare (x : string) y = compare x y
+    end)
   end
 end)