mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-09 20:55:39 -05:00
21 lines
420 B
OCaml
21 lines
420 B
OCaml
open Types_
|
|
|
|
type const_view += Str of string
|
|
|
|
let ops : Const.ops =
|
|
(module struct
|
|
let pp out = function
|
|
| Str s -> Fmt.string out s
|
|
| _ -> assert false
|
|
|
|
let equal a b =
|
|
match a, b with
|
|
| Str s1, Str s2 -> s1 = s2
|
|
| _ -> false
|
|
|
|
let hash = function
|
|
| Str s -> CCHash.string s
|
|
| _ -> assert false
|
|
end)
|
|
|
|
let make name ~ty : Const.t = Const.make (Str name) ops ~ty
|