mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Consolidate variable pretty printing
This commit is contained in:
parent
3de35f7aa2
commit
a9507cf917
7 changed files with 28 additions and 43 deletions
|
@ -23,7 +23,7 @@ use roc_repl_eval::{ReplApp, ReplAppMemory};
|
|||
use roc_reporting::report::DEFAULT_PALETTE;
|
||||
use roc_std::RocStr;
|
||||
use roc_target::TargetInfo;
|
||||
use roc_types::pretty_print::{content_to_string, name_all_type_vars};
|
||||
use roc_types::pretty_print::name_and_print_var;
|
||||
|
||||
const BLUE: &str = "\u{001b}[36m";
|
||||
const PINK: &str = "\u{001b}[35m";
|
||||
|
@ -227,9 +227,8 @@ fn gen_and_eval_llvm<'a>(
|
|||
let main_fn_var = *main_fn_var;
|
||||
|
||||
// pretty-print the expr type string for later.
|
||||
let named_result = name_all_type_vars(main_fn_var, &mut subs);
|
||||
let expr_type_str = name_and_print_var(main_fn_var, &mut subs, home, &interns);
|
||||
let content = subs.get_content_without_compacting(main_fn_var);
|
||||
let expr_type_str = content_to_string(content, &subs, home, &interns, named_result);
|
||||
|
||||
let (_, main_fn_layout) = match procedures.keys().find(|(s, _)| *s == main_fn_symbol) {
|
||||
Some(layout) => *layout,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue