on master help sign in
Add a note about using Prim IORef
c2b8150Harendra Kumar
core/src/Streamly/Internal/Data/Fold.hs+2
@@ -1689,6 +1689,8 @@ classifyScanWith f (Fold step1 initial1 extract1) =
1689
1689
1690 extract (Tuple3' kv _ x) = (Prelude.mapM extract1 kv, x)
1690 extract (Tuple3' kv _ x) = (Prelude.mapM extract1 kv, x)
1691
1691
1692+-- XXX we can use a Prim IORef if we can constrain the state "s" to be Prim
1693+--
1692-- The code is almost the same as classifyScanWith except the IORef operations.
1694-- The code is almost the same as classifyScanWith except the IORef operations.
1693--
1695--
1694-- | Same as classifyScanWith except that it uses mutable IORef cells in the
1696-- | Same as classifyScanWith except that it uses mutable IORef cells in the