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