Add javascript FFI for fastUnpack (#816)

This commit is contained in:
Andy Lok 2020-12-06 17:54:58 +08:00 committed by GitHub
parent 13cc27da1f
commit 9e22a6e07b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,7 @@ foldl1 f (x::xs) = foldl f x xs
-- If you need to unpack strings at compile time, use Prelude.unpack.
%foreign
"scheme:string-unpack"
"javascript:lambda:(str)=>__prim_js2idris_array(Array.from(str))"
export
fastUnpack : String -> List Char