mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
Add plumbing for displaying RocDec in the repl.
This commit is contained in:
parent
874ce855bc
commit
dc92de7781
6 changed files with 61 additions and 18 deletions
|
@ -1,4 +1,5 @@
|
|||
use roc_parse::ast::Expr;
|
||||
use roc_std::RocDec;
|
||||
|
||||
pub mod eval;
|
||||
pub mod gen;
|
||||
|
@ -47,5 +48,10 @@ pub trait ReplAppMemory {
|
|||
fn deref_f32(&self, addr: usize) -> f32;
|
||||
fn deref_f64(&self, addr: usize) -> f64;
|
||||
|
||||
fn deref_dec(&self, addr: usize) -> RocDec {
|
||||
let bits = self.deref_i128(addr);
|
||||
return RocDec(bits);
|
||||
}
|
||||
|
||||
fn deref_str(&self, addr: usize) -> &str;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue