From 15f66e3eaaf9f23b3ff150f6b0b945f6789c9a03 Mon Sep 17 00:00:00 2001 From: Ayaz Hafiz Date: Wed, 7 Sep 2022 12:42:46 -0500 Subject: [PATCH] Add some tracing for debug purposes --- Cargo.lock | 1 + crates/glue/Cargo.toml | 1 + crates/glue/src/types.rs | 2 ++ 3 files changed, 4 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 4836879b0f..b73ad63824 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3759,6 +3759,7 @@ dependencies = [ "roc_std", "roc_target", "roc_test_utils", + "roc_tracing", "roc_types", "strum", "strum_macros", diff --git a/crates/glue/Cargo.toml b/crates/glue/Cargo.toml index 4cc9eefa23..777041e60f 100644 --- a/crates/glue/Cargo.toml +++ b/crates/glue/Cargo.toml @@ -18,6 +18,7 @@ roc_module = { path = "../compiler/module" } roc_collections = { path = "../compiler/collections" } roc_target = { path = "../compiler/roc_target" } roc_error_macros = { path = "../error_macros" } +roc_tracing = { path = "../tracing" } bumpalo = { version = "3.8.0", features = ["collections"] } target-lexicon = "0.12.3" clap = { version = "3.2.18", default-features = false, features = ["std", "color", "suggestions", "derive"] } diff --git a/crates/glue/src/types.rs b/crates/glue/src/types.rs index 79b39bc0d5..45fc1ff953 100644 --- a/crates/glue/src/types.rs +++ b/crates/glue/src/types.rs @@ -653,6 +653,8 @@ impl<'a> Env<'a> { } 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 .layout_cache .from_var(self.arena, var, self.subs)