Plain number literals (e.g. 5) are now Num *

This commit is contained in:
Richard Feldman 2020-03-10 20:40:53 -04:00
parent 9081b7f2d1
commit 3ecbe0325c
21 changed files with 345 additions and 223 deletions

View file

@ -357,6 +357,10 @@ fn unwrap_num_tag<'a>(subs: &Subs, var: Variable) -> Result<Layout<'a>, ()> {
debug_assert!(args.is_empty());
Ok(Layout::Builtin(Builtin::Float64))
}
Content::FlexVar(_) => {
// If this was still a (Num *) then default to compiling it to i64
Ok(Layout::Builtin(Builtin::Int64))
}
other => {
panic!("TODO non structure Num.@Num flat_type {:?}", other);
}