packages feed

streamly-examples 0.3.0 → 0.3.1

raw patch · 5 files changed

+47/−26 lines, 5 filesdep ~basedep ~containersdep ~streamly

Dependency ranges changed: base, containers, streamly, streamly-core, streamly-fsevents, tasty-bench

Files

Changelog.md view
@@ -1,5 +1,9 @@ # Changelog +## 0.3.1 (Apr 2026)++* Support GHC 9.14+ ## 0.3.0 (Sep 2025)  * Support streamly-0.11.0 and streamly-core-0.3.0
examples/CirclingSquare.hs view
@@ -9,7 +9,8 @@  import qualified Data.Text as Text import qualified SDL-import qualified Streamly.Prelude as Stream+import qualified Streamly.Data.Stream as Stream+import qualified Streamly.Data.Fold as Fold  ------------------------------------------------------------------------------ -- SDL Graphics Init@@ -79,8 +80,10 @@     _ <- forkIO $ do             Stream.repeatM (updateDisplay ref rend) -- Stream IO ()                 & Stream.delay (1/60)               -- Stream IO ()-                & Stream.drain                      -- IO ()+                & Stream.fold Fold.drain                   -- IO ()      -- MacOS requires pollEvents to run in the Main thread.-    Stream.repeatM (handleEvents ref) & Stream.drainWhile (== True)+    Stream.repeatM (handleEvents ref)+        & Stream.takeWhile (== True)+        & Stream.fold Fold.drain     SDL.destroyWindow window
examples/FileSystemEvent.hs view
@@ -9,16 +9,8 @@ import qualified Streamly.Data.Fold as Fold import qualified Streamly.Data.Stream as Stream import qualified Streamly.FileSystem.Path as Path--#if darwin_HOST_OS-import qualified Streamly.Internal.FS.Event.Darwin as Event-#elif linux_HOST_OS-import qualified Streamly.Internal.FS.Event.Linux as Event-#elif mingw32_HOST_OS-import qualified Streamly.Internal.FS.Event.Windows as Event-#else-#error "FS Events not supported on this platform"-#endif+import qualified Streamly.FileSystem.Event as Event+import qualified Streamly.Internal.FS.Event as Event (showEvent)  ------------------------------------------------------------------------------- -- Main
examples/ListDir.hs view
@@ -28,7 +28,7 @@ import Streamly.Data.Stream (Stream) import Streamly.Data.Unfold (Unfold) import Streamly.FileSystem.DirIO (ReadOptions)-import Streamly.FileSystem.Path (Path)+import Streamly.FileSystem.Path (Path, OsWord) import System.IO (stdout, hSetBuffering, BufferMode(LineBuffering))  import qualified Streamly.Data.Stream.Prelude as Stream@@ -51,16 +51,30 @@ #if !defined(mingw32_HOST_OS) && !defined(__MINGW32__) import qualified Streamly.Internal.FileSystem.Posix.ReadDir as Dir     (readEitherByteChunks)+#else+import qualified Streamly.Unicode.Stream as Stream #endif  {-# INLINE recReadOpts #-} recReadOpts :: ReadOptions -> ReadOptions+{-# INLINE reEncode #-}+reEncode :: Stream IO OsWord -> Stream IO Word8+#if defined(mingw32_HOST_OS) || defined(__MINGW32__)+recReadOpts = id++reEncode =+      Stream.encodeUtf8+    . Stream.decodeUtf16le+#else recReadOpts =       DirIO.followSymlinks True     . DirIO.ignoreSymlinkLoops False     . DirIO.ignoreMissing True     . DirIO.ignoreInaccessible True +reEncode = id+#endif+ #if !defined(mingw32_HOST_OS) && !defined(__MINGW32__) -- Fastest implementation, only works for posix as of now. listDirByteChunked :: IO ()@@ -111,6 +125,7 @@ listDirChunked :: IO () listDirChunked = do     Stream.fold (Handle.writeWith 32000 stdout)+        $ reEncode         $ Stream.unfoldEachEndBy 10 Array.reader         $ fmap Path.toArray         $ Stream.unfoldEach Unfold.fromList@@ -153,6 +168,7 @@ listDir :: IO () listDir = do     Stream.fold (Handle.writeWith 32000 stdout)+        $ reEncode         $ Stream.unfoldEachEndBy 10 Array.reader         $ fmap (Path.toArray . either id id) 
streamly-examples.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name:          streamly-examples-version:       0.3.0+version:       0.3.1 license:       Apache-2.0 license-file:  LICENSE author:        Composewell Technologies@@ -22,14 +22,21 @@ category:     Streamly, Streaming, Concurrency, Text, Filesystem, Network, Reactivity stability:     provisional-tested-with: GHC==9.4.4, GHC==9.2.7, GHC==9.0.1, GHC==8.10.7+tested-with:+    GHC==9.14.1+  , GHC==9.12.4+  , GHC==9.10.3+  , GHC==9.8.4+  , GHC==9.6.3 build-type:    Simple-extra-source-files:-  Cargo.toml+extra-doc-files:   Changelog.md-  Makefile   NOTICE   README.md++extra-source-files:+  Cargo.toml+  Makefile   examples/ListDirBasic.c   examples/ListDirBasic.rs   examples/WalkDirBasic.rs@@ -37,7 +44,7 @@  source-repository head   type: git-  location: git://github.com/composewell/streamly-examples.git+  location: https://github.com/composewell/streamly-examples.git  ------------------------------------------------------------------------------ -- Flags                                                                    --@@ -65,13 +72,12 @@ common exe-dependencies   build-depends:       streamly              == 0.11.0-    -- , streamly-fsevents     == 0.1.0     , streamly-core         == 0.3.0-    , streamly-fsevents     == 0.1.0-    , base                  >= 4.9   && < 4.22+    , streamly-fsevents     >= 0.1.0 && < 0.2+    , base                  >= 4.9   && < 4.23     , directory             >= 1.2   && < 1.4     , transformers          >= 0.4   && < 0.7-    , containers            >= 0.5   && < 0.8+    , containers            >= 0.5   && < 0.9     , random                >= 1.0.0 && < 2     , exceptions            >= 0.8   && < 0.11     , transformers-base     >= 0.4   && < 0.5@@ -366,7 +372,7 @@   main-is: DateTimeParser.hs   if !impl(ghcjs)     buildable: True-    build-depends: tasty-bench >= 0.3 && < 0.5+    build-depends: tasty-bench >= 0.3 && < 0.6   else     buildable: False @@ -375,6 +381,6 @@   main-is: LogParser.hs   if !impl(ghcjs)     buildable: True-    build-depends: tasty-bench >= 0.3 && < 0.5+    build-depends: tasty-bench >= 0.3 && < 0.6   else     buildable: False