haskell - How do I work with the REPA ByteString representation? -


i want use repa arrays built bytestring types. can create array frombytestring function has type array b sh word8. however, there no equivalent computes function b type arrays.

the biggest issue want bytestring type @ end, function tobytestring requires array b sh word8 type cannot create.

it feels bytestring module in repa not implemented. comparison, vector module provides computevectors, foreignpointer module provides computeintos. there reason bytestrings missing equivalent function?

i can't see how produce array b repa either. has none of relevant instances that. open issue?

one obvious , safe workaround extract pair (int, int -> word8) delayed representation , use unfoldrn (the fitting function find public api of bytestring).

a bytestring decorated foreignptr, can use f representation (which has target instance), foreignptr out, , call data.bytestring.internal.fromforeignptr.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -