mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
s/build/load/g
This commit is contained in:
parent
eeda789b87
commit
c27e03e794
3 changed files with 6 additions and 7 deletions
|
@ -8,12 +8,12 @@ pub mod region;
|
||||||
|
|
||||||
pub mod string;
|
pub mod string;
|
||||||
|
|
||||||
pub mod build;
|
|
||||||
pub mod constrain;
|
pub mod constrain;
|
||||||
pub mod ena;
|
pub mod ena;
|
||||||
pub mod fmt;
|
pub mod fmt;
|
||||||
pub mod gen;
|
pub mod gen;
|
||||||
pub mod infer;
|
pub mod infer;
|
||||||
|
pub mod load;
|
||||||
pub mod module;
|
pub mod module;
|
||||||
pub mod pretty_print_types;
|
pub mod pretty_print_types;
|
||||||
pub mod solve;
|
pub mod solve;
|
||||||
|
|
|
@ -36,7 +36,7 @@ pub enum LoadedHeader<'a> {
|
||||||
ParsingFailed(Fail),
|
ParsingFailed(Fail),
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build<'a>(
|
pub fn load<'a>(
|
||||||
arena: &'a Bump,
|
arena: &'a Bump,
|
||||||
src_dir: &Path,
|
src_dir: &Path,
|
||||||
filename: &Path,
|
filename: &Path,
|
|
@ -10,13 +10,13 @@ extern crate roc;
|
||||||
mod helpers;
|
mod helpers;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test_build {
|
mod test_load {
|
||||||
use bumpalo::Bump;
|
use bumpalo::Bump;
|
||||||
use helpers::{fixtures_dir, im_map_from_pairs, mut_map_from_pairs};
|
use helpers::{fixtures_dir, im_map_from_pairs, mut_map_from_pairs};
|
||||||
use roc::build::LoadedHeader::*;
|
|
||||||
use roc::build::{build, LoadedHeader};
|
|
||||||
use roc::can::symbol::Symbol;
|
use roc::can::symbol::Symbol;
|
||||||
use roc::ident::UnqualifiedIdent;
|
use roc::ident::UnqualifiedIdent;
|
||||||
|
use roc::load::LoadedHeader::*;
|
||||||
|
use roc::load::{load, LoadedHeader};
|
||||||
use roc::module::ModuleName;
|
use roc::module::ModuleName;
|
||||||
use roc::region::Region;
|
use roc::region::Region;
|
||||||
|
|
||||||
|
@ -25,8 +25,7 @@ mod test_build {
|
||||||
let src_dir = fixtures_dir().join("interface_with_deps");
|
let src_dir = fixtures_dir().join("interface_with_deps");
|
||||||
let filename = src_dir.join("Primary.roc");
|
let filename = src_dir.join("Primary.roc");
|
||||||
let arena = Bump::new();
|
let arena = Bump::new();
|
||||||
let (app_header, problems, loaded_defs, loaded_headers) =
|
let (app_header, problems, loaded_defs, loaded_headers) = load(&arena, &src_dir, &filename);
|
||||||
build(&arena, &src_dir, &filename);
|
|
||||||
|
|
||||||
assert!(problems.is_empty());
|
assert!(problems.is_empty());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue