Finish first pass of Str.fromUtf8

This commit is contained in:
Jared Ramirez 2021-02-07 16:18:34 -08:00
parent 815f633a58
commit f3d9c2f2bb
12 changed files with 591 additions and 159 deletions

View file

@ -4,7 +4,7 @@ use roc_module::symbol::Symbol;
use roc_region::all::Region;
use roc_types::builtin_aliases::{
bool_type, dict_type, float_type, int_type, list_type, nat_type, num_type, ordering_type,
result_type, set_type, str_type, str_utf8_problem_type, u8_type,
result_type, set_type, str_type, str_utf8_byte_problem_type, u8_type,
};
use roc_types::solved_types::SolvedType;
use roc_types::subs::VarId;
@ -543,7 +543,8 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
let bad_utf8 = SolvedType::TagUnion(
vec![(
TagName::Global("BadUtf8".into()),
vec![str_utf8_problem_type()],
// vec![str_utf8_problem_type()],
vec![str_utf8_byte_problem_type(), nat_type()],
)],
Box::new(SolvedType::Wildcard),
);