mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
add lifetime to dependencies
This commit is contained in:
parent
b9579af16d
commit
fd7e107069
1 changed files with 8 additions and 8 deletions
|
@ -94,19 +94,19 @@ enum Status {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||||
enum Job {
|
enum Job<'a> {
|
||||||
Step(ModuleId, Phase),
|
Step(ModuleId, Phase),
|
||||||
// ResolveShorthand(&'a str),
|
ResolveShorthand(&'a str),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, Debug)]
|
#[derive(Default, Debug)]
|
||||||
struct Dependencies {
|
struct Dependencies<'a> {
|
||||||
waiting_for: MutMap<Job, MutSet<Job>>,
|
waiting_for: MutMap<Job<'a>, MutSet<Job<'a>>>,
|
||||||
notifies: MutMap<Job, MutSet<Job>>,
|
notifies: MutMap<Job<'a>, MutSet<Job<'a>>>,
|
||||||
status: MutMap<Job, Status>,
|
status: MutMap<Job<'a>, Status>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Dependencies {
|
impl<'a> Dependencies<'a> {
|
||||||
/// Add all the dependencies for a module, return (module, phase) pairs that can make progress
|
/// Add all the dependencies for a module, return (module, phase) pairs that can make progress
|
||||||
pub fn add_module(
|
pub fn add_module(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
@ -728,7 +728,7 @@ struct State<'a> {
|
||||||
pub headers_parsed: MutSet<ModuleId>,
|
pub headers_parsed: MutSet<ModuleId>,
|
||||||
|
|
||||||
pub module_cache: ModuleCache<'a>,
|
pub module_cache: ModuleCache<'a>,
|
||||||
pub dependencies: Dependencies,
|
pub dependencies: Dependencies<'a>,
|
||||||
pub procedures: MutMap<(Symbol, Layout<'a>), Proc<'a>>,
|
pub procedures: MutMap<(Symbol, Layout<'a>), Proc<'a>>,
|
||||||
pub exposed_to_host: MutMap<Symbol, Variable>,
|
pub exposed_to_host: MutMap<Symbol, Variable>,
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue