remove Content -> SolvedType conversion

This commit is contained in:
Folkert 2022-03-19 12:22:33 +01:00
parent da0c6adff3
commit 5a15a121ff
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 3 additions and 220 deletions

View file

@ -3,7 +3,7 @@ use roc_can::constraint::{Constraint as ConstraintSoa, Constraints};
use roc_can::module::RigidVariables;
use roc_collections::all::MutMap;
use roc_module::symbol::Symbol;
use roc_types::solved_types::{Solved, SolvedType};
use roc_types::solved_types::Solved;
use roc_types::subs::{StorageSubs, Subs, Variable};
use roc_types::types::Alias;
@ -60,26 +60,6 @@ pub fn run_solve(
(solved_subs, solved_env, problems)
}
pub fn make_solved_types(
solved_subs: &Solved<Subs>,
exposed_vars_by_symbol: &[(Symbol, Variable)],
) -> MutMap<Symbol, SolvedType> {
let mut solved_types = MutMap::default();
// exposed_vars_by_symbol contains the Variables for all the Symbols
// this module exposes. We want to convert those into flat SolvedType
// annotations which are decoupled from our Subs, because that's how
// other modules will generate constraints for imported values
// within the context of their own Subs.
for (symbol, var) in exposed_vars_by_symbol.iter() {
let solved_type = SolvedType::new(solved_subs, *var);
solved_types.insert(*symbol, solved_type);
}
solved_types
}
pub fn exposed_types_storage_subs(
solved_subs: &mut Solved<Subs>,
exposed_vars_by_symbol: &[(Symbol, Variable)],