mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
start on roc_load build.rs script for building the builtins
This commit is contained in:
parent
7bb1fd88fa
commit
0a6335e772
4 changed files with 38 additions and 0 deletions
|
@ -832,6 +832,31 @@ pub fn load_and_typecheck<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn load_and_typecheck_str<'a>(
|
||||
arena: &'a Bump,
|
||||
filename: PathBuf,
|
||||
source: &'a str,
|
||||
src_dir: &Path,
|
||||
exposed_types: ExposedByModule,
|
||||
target_info: TargetInfo,
|
||||
) -> Result<LoadedModule, LoadingProblem<'a>> {
|
||||
use LoadResult::*;
|
||||
|
||||
let load_start = LoadStart::from_str(arena, filename, source)?;
|
||||
|
||||
match load(
|
||||
arena,
|
||||
load_start,
|
||||
src_dir,
|
||||
exposed_types,
|
||||
Phase::SolveTypes,
|
||||
target_info,
|
||||
)? {
|
||||
Monomorphized(_) => unreachable!(""),
|
||||
TypeChecked(module) => Ok(module),
|
||||
}
|
||||
}
|
||||
|
||||
/// Main entry point to the compiler from the CLI and tests
|
||||
pub fn load_and_monomorphize<'a>(
|
||||
arena: &'a Bump,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue