Skip to content

Commit

Permalink
Merge pull request #124 from ppedrot/case-info-rm-tags
Browse files Browse the repository at this point in the history
Adapt w.r.t. coq/coq#18996.
  • Loading branch information
SkySkimmer authored May 13, 2024
2 parents 0e58667 + 22a5700 commit 7db5cb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
7 changes: 1 addition & 6 deletions src/debug.ml
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,10 @@ let debug_case_info flags ci =
let ndecls = String.concat ";" (List.map string_of_int (Array.to_list ci.ci_cstr_ndecls)) in
let nargs = String.concat ";" (List.map string_of_int (Array.to_list ci.ci_cstr_nargs)) in
let pp_info x =
let ind_tags = String.concat ";" (List.map string_of_bool x.ind_tags) in
let cstr_tags =
String.concat "," (List.map (fun tags -> String.concat ";" (List.map string_of_bool tags))
(Array.to_list x.cstr_tags))
in
let string_of_style = match x.style with
LetStyle -> "LetStyle" | IfStyle -> "IfStyle" | LetPatternStyle -> "LetPatternStyle" | MatchStyle -> "MatchStyle" | RegularStyle -> "RegularStyle"
in
Printf.sprintf "ind_tags = %s, cstr_tags = %s, style = %s" ind_tags cstr_tags string_of_style
Printf.sprintf "style = %s" string_of_style
in
debug_string flags
(Printf.sprintf "CASEINFO:inductive = %s.\nparam = %d.\nndecls = %s.\nnargs = %s.\npp_info = %s\n.EOFCASEINFO"
Expand Down
8 changes: 1 addition & 7 deletions src/parametricity.ml
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,7 @@ and translate_case_info order env ci =
}

and translate_case_printing order env cp =
let translate_bool_list l =
List.flatten (List.map (fun x -> range (fun _ -> x) (order + 1)) l)
in
{
ind_tags = (range (fun _ -> false) order) @ translate_bool_list cp.ind_tags;
cstr_tags = Array.map translate_bool_list cp.cstr_tags;
style = translate_style cp.style }
{ style = translate_style cp.style }

and translate_style x = x

Expand Down

0 comments on commit 7db5cb1

Please sign in to comment.