mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-05 19:00:33 -05:00
add Lit.Tbl,Lit.Set,Lit.Map
This commit is contained in:
parent
947f790f9f
commit
310d2183c4
2 changed files with 16 additions and 2 deletions
|
|
@ -28,12 +28,24 @@ let hash a =
|
|||
|
||||
let pp out l =
|
||||
if l.lit_sign then
|
||||
T.pp_debug out l.lit_term
|
||||
T_printer.pp out l.lit_term
|
||||
else
|
||||
Format.fprintf out "(@[@<1>¬@ %a@])" T.pp_debug l.lit_term
|
||||
Format.fprintf out "(@[@<1>¬@ %a@])" T_printer.pp l.lit_term
|
||||
|
||||
let norm_sign l =
|
||||
if l.lit_sign then
|
||||
l, true
|
||||
else
|
||||
neg l, false
|
||||
|
||||
module As_key = struct
|
||||
type nonrec t = t
|
||||
|
||||
let equal = equal
|
||||
let hash = hash
|
||||
let compare = compare
|
||||
end
|
||||
|
||||
module Map = CCMap.Make (As_key)
|
||||
module Set = CCSet.Make (As_key)
|
||||
module Tbl = CCHashtbl.Make (As_key)
|
||||
|
|
|
|||
|
|
@ -42,3 +42,5 @@ val norm_sign : t -> t * bool
|
|||
(** [norm_sign (+t)] is [+t, true],
|
||||
and [norm_sign (-t)] is [+t, false].
|
||||
In both cases the term is positive, and the boolean reflects the initial sign. *)
|
||||
|
||||
include Sidekick_sigs.WITH_SET_MAP_TBL with type t := t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue