Skip to content

Commit

Permalink
Applied justname to further reduce code
Browse files Browse the repository at this point in the history
  • Loading branch information
InfiniteEchoes committed Dec 21, 2023
1 parent ff5fbd7 commit bac3360
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/src/top_level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1580,14 +1580,10 @@ impl ImplItemKind {
coq::TopLevelItem::Instance(coq::Instance::new(
&format!("{instance_prefix}_{name}"),
&[ty_params_arg, where_predicates],
coq::Expression::Variable {
ident: Path::new(&[class_name]),
no_implicit: false,
}
.apply(&coq::Expression::Variable {
ident: Path::new(&[format!("\"{name}\"")]),
no_implicit: false,
}),

// gy@TODO: make a single_var function in coq
coq::Expression::just_name(class_name)
.apply(&coq::Expression::just_name(format!("\"{name}\"").as_str())),
&coq::Expression::Record {
fields: vec![coq::Field::new(&Path::new(&[method_name]), &[], &entry)],
},
Expand Down

0 comments on commit bac3360

Please sign in to comment.