streamly
streamly copied to clipboard
Add APIs to generate streams from a memory address
We are removing these APIs from the Array module (PR #1718), however, we can have stream equivalent of these as follows:
fromAddrN# :: Int -> Addr# -> Stream m a
fromPtrN :: Int -> Ptr a -> Stream m a
-- In Streamly.Unicode
fromUtf8# :: Addr# -> Stream m Char -- terminate on encountering Null byte
These will be useful to generate streams directly from string literals without going through lists.