Add some tracing for debug purposes

This commit is contained in:
Ayaz Hafiz 2022-09-07 12:42:46 -05:00
parent 6e64bfc513
commit 15f66e3eaa
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 4 additions and 0 deletions

1
Cargo.lock generated
View file

@ -3759,6 +3759,7 @@ dependencies = [
"roc_std", "roc_std",
"roc_target", "roc_target",
"roc_test_utils", "roc_test_utils",
"roc_tracing",
"roc_types", "roc_types",
"strum", "strum",
"strum_macros", "strum_macros",

View file

@ -18,6 +18,7 @@ roc_module = { path = "../compiler/module" }
roc_collections = { path = "../compiler/collections" } roc_collections = { path = "../compiler/collections" }
roc_target = { path = "../compiler/roc_target" } roc_target = { path = "../compiler/roc_target" }
roc_error_macros = { path = "../error_macros" } roc_error_macros = { path = "../error_macros" }
roc_tracing = { path = "../tracing" }
bumpalo = { version = "3.8.0", features = ["collections"] } bumpalo = { version = "3.8.0", features = ["collections"] }
target-lexicon = "0.12.3" target-lexicon = "0.12.3"
clap = { version = "3.2.18", default-features = false, features = ["std", "color", "suggestions", "derive"] } clap = { version = "3.2.18", default-features = false, features = ["std", "color", "suggestions", "derive"] }

View file

@ -653,6 +653,8 @@ impl<'a> Env<'a> {
} }
fn add_type(&mut self, var: Variable, types: &mut Types) -> TypeId { fn add_type(&mut self, var: Variable, types: &mut Types) -> TypeId {
roc_tracing::debug!(content=?roc_types::subs::SubsFmtContent(self.subs.get_content_without_compacting(var), self.subs), "adding type");
let layout = self let layout = self
.layout_cache .layout_cache
.from_var(self.arena, var, self.subs) .from_var(self.arena, var, self.subs)