mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 05:34:11 +03:00
Formatting
This commit is contained in:
parent
e43cd8c399
commit
929ee7f560
@ -27,9 +27,9 @@ pub const INSTRUCTIONS: &str = "Enter an expression, or :help, or :exit/:q.\n";
|
||||
pub const PROMPT: &str = concatcp!("\n", BLUE, "»", END_COL, " ");
|
||||
pub const CONT_PROMPT: &str = concatcp!(BLUE, "…", END_COL, " ");
|
||||
|
||||
mod app_memory;
|
||||
#[cfg(feature = "llvm")]
|
||||
mod eval;
|
||||
mod app_memory;
|
||||
#[cfg(feature = "llvm")]
|
||||
mod gen;
|
||||
|
||||
|
@ -157,7 +157,10 @@ fn unroll_aliases<'a, M: AppMemory>(env: &Env<'a, 'a, M>, mut content: &'a Conte
|
||||
content
|
||||
}
|
||||
|
||||
fn unroll_recursion_var<'a, M: AppMemory>(env: &Env<'a, 'a, M>, mut content: &'a Content) -> &'a Content {
|
||||
fn unroll_recursion_var<'a, M: AppMemory>(
|
||||
env: &Env<'a, 'a, M>,
|
||||
mut content: &'a Content,
|
||||
) -> &'a Content {
|
||||
while let Content::RecursionVar { structure, .. } = content {
|
||||
content = env.subs.get_content_without_compacting(*structure);
|
||||
}
|
||||
@ -216,15 +219,9 @@ fn tag_id_from_data<'a, M: AppMemory>(
|
||||
let tag_id_addr = data_addr + offset as usize;
|
||||
|
||||
match union_layout.tag_id_builtin() {
|
||||
Builtin::Bool => {
|
||||
env.app_memory.deref_bool(tag_id_addr) as i64
|
||||
}
|
||||
Builtin::Int(IntWidth::U8) => {
|
||||
env.app_memory.deref_u8(tag_id_addr) as i64
|
||||
}
|
||||
Builtin::Int(IntWidth::U16) => {
|
||||
env.app_memory.deref_u16(tag_id_addr) as i64
|
||||
}
|
||||
Builtin::Bool => env.app_memory.deref_bool(tag_id_addr) as i64,
|
||||
Builtin::Int(IntWidth::U8) => env.app_memory.deref_u8(tag_id_addr) as i64,
|
||||
Builtin::Int(IntWidth::U16) => env.app_memory.deref_u16(tag_id_addr) as i64,
|
||||
Builtin::Int(IntWidth::U64) => {
|
||||
// used by non-recursive unions at the
|
||||
// moment, remove if that is no longer the case
|
||||
@ -1129,7 +1126,11 @@ fn byte_to_ast<'a, M: AppMemory>(env: &Env<'a, '_, M>, value: u8, content: &Cont
|
||||
}
|
||||
}
|
||||
|
||||
fn num_to_ast<'a, M: AppMemory>(env: &Env<'a, '_, M>, num_expr: Expr<'a>, content: &Content) -> Expr<'a> {
|
||||
fn num_to_ast<'a, M: AppMemory>(
|
||||
env: &Env<'a, '_, M>,
|
||||
num_expr: Expr<'a>,
|
||||
content: &Content,
|
||||
) -> Expr<'a> {
|
||||
use Content::*;
|
||||
|
||||
let arena = env.arena;
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::repl::eval;
|
||||
use crate::repl::app_memory::AppMemoryInternal;
|
||||
use crate::repl::eval;
|
||||
use bumpalo::Bump;
|
||||
use inkwell::context::Context;
|
||||
use inkwell::module::Linkage;
|
||||
|
Loading…
Reference in New Issue
Block a user