mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Add module_path to can env instead of threading it through
This commit is contained in:
parent
e5789158e5
commit
5112e064e5
7 changed files with 76 additions and 194 deletions
|
@ -1,3 +1,5 @@
|
|||
use std::path::Path;
|
||||
|
||||
use crate::procedure::References;
|
||||
use crate::scope::Scope;
|
||||
use bumpalo::Bump;
|
||||
|
@ -13,6 +15,8 @@ pub struct Env<'a> {
|
|||
/// are assumed to be relative to this path.
|
||||
pub home: ModuleId,
|
||||
|
||||
pub module_path: &'a Path,
|
||||
|
||||
pub dep_idents: &'a IdentIdsByModule,
|
||||
|
||||
pub qualified_module_ids: &'a PackageModuleIds<'a>,
|
||||
|
@ -43,6 +47,7 @@ impl<'a> Env<'a> {
|
|||
pub fn new(
|
||||
arena: &'a Bump,
|
||||
home: ModuleId,
|
||||
module_path: &'a Path,
|
||||
dep_idents: &'a IdentIdsByModule,
|
||||
qualified_module_ids: &'a PackageModuleIds<'a>,
|
||||
opt_shorthand: Option<&'a str>,
|
||||
|
@ -50,6 +55,7 @@ impl<'a> Env<'a> {
|
|||
Env {
|
||||
arena,
|
||||
home,
|
||||
module_path,
|
||||
dep_idents,
|
||||
qualified_module_ids,
|
||||
problems: Vec::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue