Harendra Kumar
Harendra Kumar
I have not understood the program, but just had a cursory look at it: * Can you use Streamly Array/MutArray instead of vector? If not what is lacking in arrays...
Questions: 1. you are using a very old version of streamly - any specific reason for that? 2. can you provide a pointer to the source of runQueryFold?
This will build the entire stream first and then return it. It is not streaming. You should try using something like unfoldrM to generate a stream.
IO is a strict monad, so your fold is just like a statement in a C program, it will be evaluated completely before you move on to the next statement...
The function runQueryFoldExplicit wants you to do all the processing in the `b -> haskells -> IO b` step and only return a final value `b` after the entire processing...
Looks good. 1. is `Right Nothing` possible? 2. don't you need to call `closeCursor` in `Left (Just haskells)` case as well? You can use `Streamly.Prelude.bracket` or `Streamly.Prelude.finally` to close the...
1. You can use `bracketIO` instead, and open the cursor inside the bracket itself. In fact this code is very similar to file opening and reading code. It has exactly...
I am not sure if this will fuse, because of the monad bind - maybe latest GHCs can do it. To be sure we will have to make a small...
You have shifted the problem to locationQueryStream, now it is returning `m(SerialT IO)`. There is a simple solution to this. You do not need to call `getDbConnection` at call site....
> Won't I have to juggle around with liftIO and UnliftIO.withRunInIO to make all of the following align? I did not know the types and UnliftIO issue. > Does this...