mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-21 15:59:20 +03:00
Fix imports
This commit is contained in:
parent
414a320358
commit
91ceebc065
@ -1,7 +1,7 @@
|
||||
use bumpalo::Bump;
|
||||
use roc_build::{
|
||||
link::{link, preprocess_host_wasm32, rebuild_host, LinkType, LinkingStrategy},
|
||||
program::{self, CodeGenOptions, Problems},
|
||||
program::{self, CodeGenOptions},
|
||||
};
|
||||
use roc_builtins::bitcode;
|
||||
use roc_load::{
|
||||
@ -9,7 +9,10 @@ use roc_load::{
|
||||
LoadingProblem, Threading,
|
||||
};
|
||||
use roc_mono::ir::OptLevel;
|
||||
use roc_reporting::report::{RenderTarget, DEFAULT_PALETTE};
|
||||
use roc_reporting::{
|
||||
cli::Problems,
|
||||
report::{RenderTarget, DEFAULT_PALETTE},
|
||||
};
|
||||
use roc_target::TargetInfo;
|
||||
use std::time::{Duration, Instant};
|
||||
use std::{path::PathBuf, thread::JoinHandle};
|
||||
@ -456,7 +459,7 @@ pub fn check_file(
|
||||
roc_file_path: PathBuf,
|
||||
emit_timings: bool,
|
||||
threading: Threading,
|
||||
) -> Result<(program::Problems, Duration), LoadingProblem> {
|
||||
) -> Result<(Problems, Duration), LoadingProblem> {
|
||||
let compilation_start = Instant::now();
|
||||
|
||||
// only used for generating errors. We don't do code generation, so hardcoding should be fine
|
||||
|
@ -7,10 +7,11 @@ use build::BuiltFile;
|
||||
use bumpalo::Bump;
|
||||
use clap::{Arg, ArgMatches, Command, ValueSource};
|
||||
use roc_build::link::{LinkType, LinkingStrategy};
|
||||
use roc_build::program::{CodeGenBackend, CodeGenOptions, Problems};
|
||||
use roc_build::program::{CodeGenBackend, CodeGenOptions};
|
||||
use roc_error_macros::{internal_error, user_error};
|
||||
use roc_load::{ExpectMetadata, LoadingProblem, Threading};
|
||||
use roc_mono::ir::OptLevel;
|
||||
use roc_reporting::cli::Problems;
|
||||
use std::env;
|
||||
use std::ffi::{CString, OsStr};
|
||||
use std::io;
|
||||
|
@ -3,16 +3,12 @@ use roc_error_macros::internal_error;
|
||||
use roc_gen_llvm::llvm::build::{module_from_builtins, LlvmBackendMode};
|
||||
use roc_gen_llvm::llvm::externs::add_default_roc_externs;
|
||||
use roc_load::{EntryPoint, ExpectMetadata, LoadedModule, MonomorphizedModule};
|
||||
use roc_module::symbol::{Interns, ModuleId};
|
||||
use roc_mono::ir::OptLevel;
|
||||
use roc_region::all::LineInfo;
|
||||
use roc_reporting::cli::report_problems;
|
||||
use roc_solve_problem::TypeError;
|
||||
use roc_reporting::cli::{report_problems, Problems};
|
||||
use std::ops::Deref;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use roc_collections::all::MutMap;
|
||||
#[cfg(feature = "target-wasm32")]
|
||||
use roc_collections::all::MutSet;
|
||||
|
||||
|
@ -4,9 +4,6 @@ use std::path::{Path, PathBuf};
|
||||
use bumpalo::Bump;
|
||||
use roc_module::symbol::ModuleId;
|
||||
|
||||
#[cfg(not(windows))]
|
||||
const ROC_SKIP_SUBS_CACHE: &str = "ROC_SKIP_SUBS_CACHE";
|
||||
|
||||
const SKIP_SUBS_CACHE: bool = {
|
||||
match option_env!("ROC_SKIP_SUBS_CACHE") {
|
||||
Some(s) => s.len() == 1 && s.as_bytes()[0] == b'1',
|
||||
|
@ -2003,3 +2003,29 @@ fn match_list() {
|
||||
"#
|
||||
)
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn foo1() {
|
||||
let _tracing_guards = roc_tracing::setup_tracing!();
|
||||
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
Html state : [
|
||||
Element (List (Html state)),
|
||||
]
|
||||
|
||||
translateStatic : Html _ -> Html _
|
||||
translateStatic = \node ->
|
||||
when node is
|
||||
Element children ->
|
||||
newChildren = List.map children translateStatic
|
||||
|
||||
Element newChildren
|
||||
|
||||
main = when translateStatic (Element []) is
|
||||
_ -> ""
|
||||
"#
|
||||
)
|
||||
}
|
||||
|
@ -8,4 +8,17 @@ app "rocLovesPlatforms"
|
||||
imports []
|
||||
provides [main] to pf
|
||||
|
||||
main = "Which platform am I running on now?\n"
|
||||
Html state : [
|
||||
Element (List (Html state)),
|
||||
]
|
||||
|
||||
translateStatic : Html _ -> Html _
|
||||
translateStatic = \node ->
|
||||
when node is
|
||||
Element children ->
|
||||
newChildren = List.map children translateStatic
|
||||
|
||||
Element newChildren
|
||||
|
||||
main = when translateStatic (Element []) is
|
||||
_ -> ""
|
||||
|
Loading…
Reference in New Issue
Block a user