Skip to content

Commit

Permalink
fixed for ocaml 4.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Alizter committed Jul 28, 2020
1 parent f8985dc commit 0de602d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions dpd_compute.ml
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ module Node = struct

let hash n = id n
let equal n1 n2 = id n1 = id n2
let compare n1 n2 = Pervasives.compare (id n1) (id n2)
let compare n1 n2 = compare (id n1) (id n2)
end
module Edge = struct
type t = (string * string) list

let get_attrib a e = get_attrib a e
let bool_attrib a e = bool_attrib a e

let compare e1 e2 = Pervasives.compare e1 e2
let compare e1 e2 = compare e1 e2
let default = []
end
module G = Graph.Imperative.Digraph.ConcreteLabeled(Node)(Edge)
Expand Down
10 changes: 5 additions & 5 deletions graphdepend.mlg
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module G = struct
type t = int * Names.GlobRef.t
let id n = fst n
let gref n = snd n
let compare n1 n2 = Pervasives.compare (id n1) (id n2)
let compare n1 n2 = compare (id n1) (id n2)
let equal n1 n2 = 0 = compare n1 n2

let full_name n =
Expand Down Expand Up @@ -198,16 +198,16 @@ end = struct
let is_prop = is_prop gref id in
let acc = ("prop", if is_prop then "yes" else "no")::acc in
let acc = match gref with
| Globnames.ConstRef cnst ->
| Names.GlobRef.ConstRef cnst ->
let acc = ("kind", "cnst")::acc in
add_cnst_attrib acc cnst
| Globnames.IndRef _ ->
| Names.GlobRef.IndRef _ ->
let acc = ("kind", "inductive")::acc in
acc
| Globnames.ConstructRef _ ->
| Names.GlobRef.ConstructRef _ ->
let acc = ("kind", "construct")::acc in
acc
| Globnames.VarRef _ -> assert false
| Names.GlobRef.VarRef _ -> assert false
in acc

let pp_attribs fmt attribs =
Expand Down
8 changes: 4 additions & 4 deletions searchdepend.mlg
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ let add_identifier (x:Names.Id.t)(d:Data.t) =
let add_sort (s:Sorts.t)(d:Data.t) = d

let add_constant (cst:Names.Constant.t)(d:Data.t) =
Data.add (Globnames.ConstRef cst) d
Data.add (Names.GlobRef.ConstRef cst) d

let add_inductive ((k,i):Names.inductive)(d:Data.t) =
Data.add (Globnames.IndRef (k, i)) d
Data.add (Names.GlobRef.IndRef (k, i)) d

let add_constructor(((k,i),j):Names.constructor)(d:Data.t) =
Data.add (Globnames.ConstructRef ((k,i),j)) d
Data.add (Names.GlobRef.ConstructRef ((k,i),j)) d

let collect_long_names (c:Constr.t) (acc:Data.t) =
let rec add acc c =
Expand All @@ -51,7 +51,7 @@ let collect_long_names (c:Constr.t) (acc:Data.t) =
| Const cst -> add_constant (Univ.out_punivs cst) acc
| Ind i -> add_inductive (Univ.out_punivs i) acc
| Construct cnst -> add_constructor (Univ.out_punivs cnst) acc
| Case({ci_ind=i},_,_,_,_) ->
| Case({ci_ind=i},_,_,_) ->
add_inductive i (Constr.fold add acc c)
| _ -> Constr.fold add acc c
in add acc c
Expand Down

0 comments on commit 0de602d

Please sign in to comment.