add Str.toBytes

This commit is contained in:
Folkert 2021-02-21 19:52:32 +01:00
parent bcbef5d3aa
commit 9116e9e8c9
10 changed files with 73 additions and 2 deletions

View file

@ -623,6 +623,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
),
);
// toBytes : Str -> List U8
add_type(
Symbol::STR_TO_BYTES,
top_level_function(vec![str_type()], Box::new(list_type(u8_type()))),
);
// fromFloat : Float a -> Str
add_type(
Symbol::STR_FROM_FLOAT,