diff --git a/crates/compiler/load_internal/src/file.rs b/crates/compiler/load_internal/src/file.rs index 0a7af0bba0..4b8384a17b 100644 --- a/crates/compiler/load_internal/src/file.rs +++ b/crates/compiler/load_internal/src/file.rs @@ -49,7 +49,7 @@ use roc_solve::module::{extract_module_owned_implementations, Solved, SolvedModu use roc_solve_problem::TypeError; use roc_target::TargetInfo; use roc_types::subs::{ExposedTypesStorageSubs, Subs, VarStore, Variable}; -use roc_types::types::{Alias, AliasKind}; +use roc_types::types::{Alias, AliasKind, Types}; use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::collections::HashMap; use std::env::current_dir; @@ -646,6 +646,7 @@ struct ConstrainedModule { var_store: VarStore, dep_idents: IdentIdsByModule, module_timing: ModuleTiming, + types: Types, // Rather than adding pending derives as constraints, hand them directly to solve because they // must be solved at the end of a module. pending_derives: PendingDerives, @@ -4703,6 +4704,7 @@ fn canonicalize_and_constrain<'a>( &symbols_from_requires, &mut var_store, ); + let types = Types::new(); // _after has an underscore because it's unused in --release builds let _after = roc_types::types::get_type_clone_count(); @@ -4817,6 +4819,7 @@ fn canonicalize_and_constrain<'a>( ident_ids: module_output.scope.locals.ident_ids, dep_idents, module_timing, + types, pending_derives: module_output.pending_derives, }; diff --git a/crates/compiler/types/src/types.rs b/crates/compiler/types/src/types.rs index 7898b56189..0925ca43bd 100644 --- a/crates/compiler/types/src/types.rs +++ b/crates/compiler/types/src/types.rs @@ -365,6 +365,7 @@ impl std::ops::Neg for Polarity { } } +#[derive(Debug)] pub struct AliasShared { pub symbol: Symbol, pub type_argument_abilities: Slice, @@ -456,6 +457,7 @@ impl AsideTypeSlice { /// the [type solving representation][crate::subs::Content] of types. /// /// See [TypeTag]. +#[derive(Debug)] pub struct Types { // main storage. Each type is represented by a tag, which is identified by its index. // `tags_slices` is a parallel array (so these two vectors always have the same size), that