Add JSON builtin, pass along solved specializations per module

This commit is contained in:
Ayaz Hafiz 2022-05-11 14:31:06 -04:00
parent 312cdd0b70
commit 0f4be93e44
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
8 changed files with 93 additions and 13 deletions

View file

@ -1,5 +1,5 @@
use crate::solve::{self, Aliases};
use roc_can::abilities::AbilitiesStore;
use roc_can::abilities::{AbilitiesStore, SolvedSpecializations};
use roc_can::constraint::{Constraint as ConstraintSoa, Constraints};
use roc_can::module::RigidVariables;
use roc_collections::all::MutMap;
@ -20,11 +20,15 @@ pub struct SolvedModule {
/// to create the types for HostExposed. This
/// has some overlap with the StorageSubs fields,
/// so maybe we can get rid of this at some point
///
/// Contains both variables of symbols that are explicitly exposed by the header,
/// and the variables of any solved ability specializations we have.
pub exposed_vars_by_symbol: Vec<(Symbol, Variable)>,
/// Used when importing this module into another module
pub stored_vars_by_symbol: Vec<(Symbol, Variable)>,
pub storage_subs: StorageSubs,
pub solved_specializations: SolvedSpecializations,
}
pub fn run_solve(