Add a note about using Prim IORef
commitc2b81507dd8e3b8028f00d17f15335a3306f570f
authorHarendra Kumar <harendra@composewell.com>
dateSat 26 Mar 2022, 14:03 (5 years ago)
parent6dc5876
core/src/Streamly/Internal/Data/Fold.hs+2
@@ -1689,6 +1689,8 @@ classifyScanWith f (Fold step1 initial1 extract1) =
16891689
16901690 extract (Tuple3' kv _ x) = (Prelude.mapM extract1 kv, x)
16911691
1692+-- XXX we can use a Prim IORef if we can constrain the state "s" to be Prim
1693+--
16921694-- The code is almost the same as classifyScanWith except the IORef operations.
16931695--
16941696-- | Same as classifyScanWith except that it uses mutable IORef cells in the