mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Fix some type mismatches
This commit is contained in:
parent
3765cbbc8f
commit
946b44cfd0
4 changed files with 8 additions and 3 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -3444,6 +3444,7 @@ dependencies = [
|
|||
"roc_error_macros",
|
||||
"roc_fmt",
|
||||
"roc_gen_llvm",
|
||||
"roc_glue",
|
||||
"roc_linker",
|
||||
"roc_load",
|
||||
"roc_module",
|
||||
|
|
|
@ -44,6 +44,7 @@ target-all = [
|
|||
roc_collections = { path = "../compiler/collections" }
|
||||
roc_can = { path = "../compiler/can" }
|
||||
roc_docs = { path = "../docs" }
|
||||
roc_glue = { path = "../glue" }
|
||||
roc_parse = { path = "../compiler/parse" }
|
||||
roc_region = { path = "../compiler/region" }
|
||||
roc_module = { path = "../compiler/module" }
|
||||
|
|
|
@ -7,6 +7,7 @@ use roc_cli::{
|
|||
};
|
||||
use roc_docs::generate_docs_html;
|
||||
use roc_error_macros::user_error;
|
||||
use roc_glue;
|
||||
use roc_load::{LoadingProblem, Threading};
|
||||
use std::fs::{self, FileType};
|
||||
use std::io;
|
||||
|
@ -65,11 +66,11 @@ fn main() -> io::Result<()> {
|
|||
}
|
||||
}
|
||||
Some((CMD_GLUE, matches)) => {
|
||||
let input_path: &Path = matches.get_one(ROC_FILE).unwrap();
|
||||
let output_path: &Path = matches.get_one(GLUE_FILE).unwrap();
|
||||
let input_path = Path::new(matches.value_of_os(ROC_FILE).unwrap());
|
||||
let output_path = Path::new(matches.value_of_os(GLUE_FILE).unwrap());
|
||||
|
||||
if Some("rs") == output_path.extension().and_then(OsStr::to_str) {
|
||||
glue::load(input_path, output_path)
|
||||
roc_glue::generate(input_path, output_path)
|
||||
} else {
|
||||
eprintln!("Currently, `roc glue` only supports generating Rust glue files (with the .rs extension). In the future, the plan is to decouple `roc glue` from any particular output format, by having it accept a second .roc file which gets executed as a plugin to generate glue code for any desired language. However, this has not yet been implemented, and for now only .rs is supported.");
|
||||
|
||||
|
|
|
@ -3,3 +3,5 @@ pub mod load;
|
|||
pub mod rust_glue;
|
||||
pub mod structs;
|
||||
pub mod types;
|
||||
|
||||
pub use load::generate;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue