Merge pull request #4364 from travisstaloch/str-graphemes

Str graphemes
This commit is contained in:
Richard Feldman 2022-10-22 22:31:50 -07:00 committed by GitHub
commit f734cc11c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 94 additions and 45 deletions

View file

@ -6049,6 +6049,20 @@ fn run_low_level<'a, 'ctx, 'env>(
bitcode::STR_WITH_CAPACITY,
)
}
StrGraphemes => {
// Str.graphemes : Str -> List Str
debug_assert_eq!(args.len(), 1);
let string = load_symbol(scope, &args[0]);
call_str_bitcode_fn(
env,
&[string],
&[],
BitcodeReturns::List,
bitcode::STR_GRAPHEMES,
)
}
ListLen => {
// List.len : List * -> Nat
debug_assert_eq!(args.len(), 1);