Commit 9386685d authored by Kim Nguyễn's avatar Kim Nguyễn

Put the type definition for Descr.t outside of the Descr module.

parent c1336b43
......@@ -134,6 +134,21 @@ end
type pair_kind = [ `Normal | `XML ]
type ('atoms, 'ints, 'chars, 'times, 'xml, 'arrow, 'record, 'abstract) descr_ =
{
atoms : 'atoms;
ints : 'ints;
chars : 'chars;
times : 'times;
xml : 'xml;
arrow : 'arrow;
record : 'record;
abstract : 'abstract;
absent : bool;
}
module BoolAtoms = Bool.MakeVar(Atoms)
module BoolIntervals = Bool.MakeVar(Intervals)
module BoolChars = Bool.MakeVar(Chars)
......@@ -141,35 +156,17 @@ module BoolAbstracts = Bool.MakeVar(Abstracts)
module rec Descr :
sig
type s = {
atoms : BoolAtoms.t;
ints : BoolIntervals.t;
chars : BoolChars.t;
times : BoolPair.t;
xml : BoolPair.t;
arrow : BoolPair.t;
record: BoolRec.t;
abstract: BoolAbstracts.t;
absent: bool;
}
include Custom.T with type t = s
include Custom.T with
type t = (BoolAtoms.t, BoolIntervals.t, BoolChars.t, BoolPair.t,
BoolPair.t, BoolPair.t, BoolRec.t, BoolAbstracts.t) descr_
val empty: t
val any : t
val is_empty : t -> bool
end =
struct
type s = {
atoms : BoolAtoms.t;
ints : BoolIntervals.t;
chars : BoolChars.t;
times : BoolPair.t;
xml : BoolPair.t;
arrow : BoolPair.t;
record: BoolRec.t;
abstract: BoolAbstracts.t;
absent: bool;
}
type t = s
type t = (BoolAtoms.t, BoolIntervals.t, BoolChars.t, BoolPair.t,
BoolPair.t, BoolPair.t, BoolRec.t, BoolAbstracts.t) descr_
let dump ppf d =
Format.fprintf ppf "@[<v 1>types:@\n\
......@@ -3456,8 +3453,8 @@ end
module Tallying = struct
type constr =
|Pos of (Var.var * s) (** alpha <= t | alpha \in P *)
|Neg of (s * Var.var) (** t <= alpha | alpha \in N *)
|Pos of (Var.var * Descr.t) (** alpha <= t | alpha \in P *)
|Neg of (Descr.t * Var.var) (** t <= alpha | alpha \in N *)
exception UnSatConstr of string
......@@ -3480,7 +3477,7 @@ module Tallying = struct
end
type key = Key.t
module VarMap = Map.Make(Key)
type t = (Descr.s * Descr.s) VarMap.t
type t = (Descr.t * Descr.t) VarMap.t
let singleton = VarMap.singleton
let cardinal = VarMap.cardinal
......@@ -3544,7 +3541,7 @@ module Tallying = struct
(* Set of equation sets *)
module ES = struct
include Set.Make(struct
type t = Descr.s E.t
type t = Descr.t E.t
let compare = E.compare semantic_compare
end)
......@@ -3650,9 +3647,9 @@ module Tallying = struct
type s = S.t
type m = M.t
type es = ES.t
type sigma = Descr.s E.t
type sigma = Descr.t E.t
module SUB = SortedList.FiniteCofinite(struct
type t = Descr.s E.t
type t = Descr.t E.t
let compare = E.compare compare
let equal = E.equal equal
let hash = Hashtbl.hash
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment