mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
remove Content -> SolvedType conversion
This commit is contained in:
parent
da0c6adff3
commit
5a15a121ff
2 changed files with 3 additions and 220 deletions
|
@ -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)],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue