From 14975b2a650a2b9d8f613d8cd9f8f15befc94560 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sat, 29 Nov 2025 21:17:24 +0100 Subject: [PATCH] fix example for separate `writeFile` became less polymorphic in ~v2 so the example ceased to typecheck (I guess the current `withFile` implementation would require `unliftIO` or something such to work right.) The fixed version is not as satisfactory but at least works. Thanks to `int-e` from IRC for spotting this. --- src/Streaming/Internal.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Streaming/Internal.hs b/src/Streaming/Internal.hs index d62325c..6592533 100644 --- a/src/Streaming/Internal.hs +++ b/src/Streaming/Internal.hs @@ -1063,7 +1063,7 @@ separate odd_even Or we can write them to separate files or whatever: ->>> S.writeFile "even.txt" . S.show $ S.writeFile "odd.txt" . S.show $ S.separate odd_even +>>> withFile "even.txt" WriteMode $ \he -> withFile "odd.txt" WriteMode $ \ho -> S.toHandle he . S.show $ S.toHandle ho . S.show $ S.separate odd_even >>> :! cat even.txt 2 4