Skip to content

Commit

Permalink
refactor: remove some junk type alias (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrinberg authored Aug 30, 2024
1 parent 684f0b5 commit e34378a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/compile.ml
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ let trans_set cache (cm : Color_map.Table.t) s =
match Cset.one_char s with
| Some i -> Cset.csingle (Color_map.Table.get_char cm i)
| None ->
let v = Cset.hash_rec s, s in
let v = Cset.hash s, s in
(try Cset.CSetMap.find v !cache with
| Not_found ->
let l = Color_map.Table.translate_colors cm s in
Expand Down
2 changes: 0 additions & 2 deletions lib/cset.ml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ let rec mem (c : int) s =

(****)

type hash = int

let rec hash_rec = function
| [] -> 0
| (i, j) :: r -> i + (13 * j) + (257 * hash_rec r)
Expand Down
5 changes: 1 addition & 4 deletions lib/cset.mli
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,10 @@ val graph : t
val print : t
val punct : t

type hash

val hash : t -> hash
val pp : Format.formatter -> t -> unit
val one_char : t -> c option
val fold_right : t -> init:'acc -> f:(c * c -> 'acc -> 'acc) -> 'acc
val hash_rec : t -> int
val hash : t -> int

module CSetMap : Map.S with type key = int * t

Expand Down

0 comments on commit e34378a

Please sign in to comment.