mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-13 23:36:29 +00:00
Drop unused function
This commit is contained in:
parent
1afae9affd
commit
0ec0568ef9
1 changed files with 0 additions and 37 deletions
|
@ -558,40 +558,3 @@ impl<'a> QueryCtx<'a> {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub fn infer_queries_help(src: &str, expected: impl FnOnce(&str), options: InferOptions) {
|
||||
let InferredProgram {
|
||||
program,
|
||||
inferred_queries,
|
||||
} = infer_queries(src, options).unwrap();
|
||||
|
||||
let mut output_parts = Vec::with_capacity(inferred_queries.len() + 2);
|
||||
|
||||
if options.print_can_decls {
|
||||
use roc_can::debug::{pretty_print_declarations, PPCtx};
|
||||
let ctx = PPCtx {
|
||||
home: program.home,
|
||||
interns: &program.interns,
|
||||
print_lambda_names: true,
|
||||
};
|
||||
let pretty_decls = pretty_print_declarations(&ctx, &program.declarations);
|
||||
output_parts.push(pretty_decls);
|
||||
output_parts.push("\n".to_owned());
|
||||
}
|
||||
|
||||
for InferredQuery { elaboration, .. } in inferred_queries {
|
||||
let output_part = match elaboration {
|
||||
Elaboration::Specialization {
|
||||
specialized_name,
|
||||
typ,
|
||||
} => format!("{specialized_name} : {typ}"),
|
||||
Elaboration::Source { source, typ } => format!("{source} : {typ}"),
|
||||
Elaboration::Instantiation { .. } => panic!("Use uitest instead"),
|
||||
};
|
||||
output_parts.push(output_part);
|
||||
}
|
||||
|
||||
let pretty_output = output_parts.join("\n");
|
||||
|
||||
expected(&pretty_output);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue