Move solve problems to their own crate

This commit is contained in:
Ayaz Hafiz 2022-07-25 17:13:03 -04:00
parent ae4916ceb7
commit 0989b2cb82
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
17 changed files with 125 additions and 85 deletions

View file

@ -8,6 +8,7 @@ use roc_collections::VecMap;
use roc_derive::SharedDerivedModule;
use roc_error_macros::internal_error;
use roc_module::symbol::{ModuleId, Symbol};
use roc_solve_problem::TypeError;
use roc_types::subs::{Content, ExposedTypesStorageSubs, FlatType, StorageSubs, Subs, Variable};
use roc_types::types::{Alias, MemberImpl};
@ -32,7 +33,7 @@ impl<T> Solved<T> {
#[derive(Debug)]
pub struct SolvedModule {
pub problems: Vec<solve::TypeError>,
pub problems: Vec<TypeError>,
/// all aliases and their definitions. this has to include non-exposed aliases
/// because exposed aliases can depend on non-exposed ones)
@ -64,12 +65,7 @@ pub fn run_solve(
pending_derives: PendingDerives,
exposed_by_module: &ExposedByModule,
derived_module: SharedDerivedModule,
) -> (
Solved<Subs>,
solve::Env,
Vec<solve::TypeError>,
AbilitiesStore,
) {
) -> (Solved<Subs>, solve::Env, Vec<TypeError>, AbilitiesStore) {
for (var, name) in rigid_variables.named {
subs.rigid_var(var, name);
}