Packages / openSUSE Leap 15.6 / ghc-streaming

Package: ghc-streaming (0.2.3.1-bp156.3.4)

An elementary streaming prelude and general stream type

This package contains two modules, <http://hackage.haskell.org/package/streaming/docs/Streaming.html Streaming> and <http://hackage.haskell.org/package/streaming/docs/Streaming-Prelude.html Streaming.Prelude>. The principal module, <http://hackage.haskell.org/package/streaming-0.1.4.3/docs/Streaming-Prelude.html Streaming.Prelude>, exports an elementary streaming prelude focused on a simple "source" or "producer" type, namely 'Stream (Of a) m r'. This is a sort of effectful version of '([a],r)' in which successive elements of type 'a' arise from some sort of monadic action before the succession ends with a value of type 'r'. Everything in the library is organized to make programming with this type as simple as possible, by the simple expedient of making it as close to 'Prelude' and 'Data.List' as possible. Thus for example the trivial program > >>> S.sum $ S.take 3 (S.readLn :: Stream (Of Int) IO ()) > 1<Enter> > 2<Enter> > 3<Enter> > 6 :> () sums the first three valid integers from user input. Similarly, > >>> S.stdoutLn $ S.map (map toUpper) $ S.take 2 S.stdinLn > hello<Enter> > HELLO > world!<Enter> > WORLD! upper-cases the first two lines from stdin as they arise, and sends them to stdout. And so on, with filtering, mapping, breaking, chunking, zipping, unzipping, replicating and so forth: we program with streams of 'Int's or 'String's directly as if they constituted something like a list. That's because streams really do constitute something like a list, and the associated operations can mostly have the same names. (A few, like 'reverse', don't stream and thus disappear; others like 'unzip' are here given properly streaming formulation for the first time.) And we everywhere oppose "extracting a pure list from IO", which is the origin of typical Haskell memory catastrophes. Basically any case where you are tempted to use 'mapM', 'replicateM', 'traverse' or 'sequence' with Haskell lists, you would do better to use something like 'Stream (Of a) m r'. The type signatures are a little fancier, but the programs themselves are mostly the same. /In fact, they are mostly simpler./ Thus, consider the trivial demo program mentioned in <http://stackoverflow.com/questions/24068399/haskell-performance-of-iorefs this SO question> > main = mapM newIORef [1..10^8::Int] >>= mapM readIORef >>= mapM_ print The new user notices that this exhausts memory, and worries about the efficiency of Haskell 'IORefs'. But of course it exhausts memory! Look what it says! The problem is immediately cured by writing > main = S.print $ S.mapM readIORef $ S.mapM newIORef $ S.each [1..10^8::Int] which really does what the other program was meant to do, uses no more memory than 'hello-world', /and is simpler anyway/, since it doesn't involve the detour of "extracting a list from IO". Almost every use of list 'mapM', 'replicateM', 'traverse' and 'sequence' produces this problem on a smaller scale. People get used to it, as if it were characteristic of Haskell programs to use a lot of memory. But in truth "extracting a list or sequence from IO" is mostly just bad practice pure and simple. Of course, 'mapM', 'replicateM', 'traverse' and 'sequence' make sense for lists, under certain conditions! But 'unsafePerformIO' also makes sense under certain conditions. The <http://hackage.haskell.org/package/streaming-0.1.4.3/docs/Streaming.html Streaming> module exports the general type, 'Stream f m r', which can be used to stream successive distinct steps characterized by /any/ functor 'f', though we are mostly interested in organizing computations of the form 'Stream (Of a) m r'. The streaming-IO libraries have various devices for dealing with effectful variants of '[a]' or '([a],r)' in which the emergence of successive elements somehow depends on IO. But it is only with the general type 'Stream f m r', or some equivalent, that one can envisage (for example) the connected streaming of their sorts of stream - as one makes lists of lists in the Haskell 'Prelude' and 'Data.List'. One needs some such type if we are to express properly streaming equivalents of e.g. > group :: Ord a => [a] -> [[a]] > chunksOf :: Int -> [a] -> [[a]] > lines :: [Char] -> [[Char]] -- but similarly with byte streams, etc. to mention a few obviously desirable operations. (This is explained more elaborately in the <https://hackage.haskell.org/package/streaming#readme readme> below.) One could of course throw something like the present 'Stream' type on top of a prior stream concept: this is how 'pipes' and 'pipes-group' (which are very much our model here) use 'FreeT'. But once one grasps the iterable stream concept needed to express those functions then one will also see that, with it, one is /already/ in possession of a complete elementary streaming library - since one possesses 'Stream ((,) a) m r' or equivalently 'Stream (Of a) m r'. This is the type of a 'generator' or 'producer' or 'source' or whatever you call an effectful stream of items. /The present Streaming.Prelude is thus the simplest streaming library that can replicate anything like the API of the Prelude and Data.List/. The emphasis of the library is on interoperation; for the rest its advantages are: extreme simplicity, re-use of intuitions the user has gathered from mastery of 'Prelude' and 'Data.List', and a total and systematic rejection of type synonyms. The two conceptual pre-requisites are some comprehension of monad transformers and some familiarity with 'rank 2 types'. It is hoped that experimentation with this simple material, starting with the ghci examples in 'Streaming.Prelude', will give people who are new to these concepts some intuition about their importance. The most fundamental purpose of the library is to express elementary streaming ideas without reliance on a complex framework, but in a way that integrates transparently with the rest of Haskell, using ideas - e.g. rank 2 types, which are here implicit or explicit in most mapping - that the user can carry elsewhere, rather than chaining her understanding to the curiosities of a so-called streaming IO framework (as necessary as that is for certain purposes.) See the <https://hackage.haskell.org/package/streaming#readme readme> below for further explanation, including the examples linked there. Elementary usage can be divined from the ghci examples in 'Streaming.Prelude' and perhaps from this rough beginning of a <https://github.com/michaelt/streaming-tutorial/blob/master/tutorial.md tutorial>. Note also the <https://hackage.haskell.org/package/streaming-bytestring streaming bytestring> and <https://hackage.haskell.org/package/streaming-utils streaming utils> packages. Questions about usage can be put raised on StackOverflow with the tag '[haskell-streaming]', or as an issue on Github, or on the <https://groups.google.com/forum/#!forum/haskell-pipes pipes list> (the package understands itself as part of the pipes 'ecosystem'.) The simplest form of interoperation with <http://hackage.haskell.org/package/pipes pipes> is accomplished with this isomorphism: > Pipes.unfoldr Streaming.next :: Stream (Of a) m r -> Producer a m r > Streaming.unfoldr Pipes.next :: Producer a m r -> Stream (Of a) m r Interoperation with <http://hackage.haskell.org/package/io-streams io-streams> is thus: > Streaming.reread IOStreams.read :: InputStream a -> Stream (Of a) IO () > IOStreams.unfoldM Streaming.uncons :: Stream (Of a) IO () -> IO (InputStream a) With <http://hackage.haskell.org/package/conduit conduit> one might use, e.g.: > Conduit.unfoldM Streaming.uncons :: Stream (Of a) m () -> Source m a > str -> Streaming.mapM_ Conduit.yield (hoist lift str) :: Stream (Of o) m r -> ConduitM i o m r > src -> hoist lift str $$ Conduit.mapM_ Streaming.yield :: Source m a -> Stream (Of a) m () These conversions should never be more expensive than a single '>->' or '=$='. The simplest interoperation with regular Haskell lists is provided by, say > Streaming.each :: [a] -> Stream (Of a) m () > Streaming.toList_ :: Stream (Of a) m r -> m [a] The latter of course accumulates the whole list in memory, and is mostly what we are trying to avoid. Every use of 'Prelude.mapM f' should be reconceived as using the composition 'Streaming.toList_ . Streaming.mapM f . Streaming.each' with a view to considering whether the accumulation required by 'Streaming.toList_' is really necessary. Here are the results of some <https://gist.github.com/michaelt/96606bbf05b29bf43a05aba081dc9bd4#file-benchmachines-hs microbenchmarks> based on the <https://github.com/ekmett/machines/blob/master/benchmarks/Benchmarks.hs benchmarks> included in the machines package: <<http://i.imgur.com/YbQtlXm.png>> Because these are microbenchmarks for individual functions, they represent a sort of "worst case"; many other factors can influence the speed of a complex program.

Package information

Homepage
[https://hackage.haskell.org/package/streaming]
License
BSD-3-Clause
Mainteneur du paquet aval
Inconnu : non déclaré dans la source indexée
Paquet source
[ghc-streaming]
Software project
[ghc-streaming]

Versions and downloads for ghc-streaming

Version / releaseArchitecture / repositoryPackage sizeInstalled sizeFilesPublisher repository artifact
0.2.3.1-bp156.3.4leap-15.6 / ossaarch64openSUSE Leap 15.6 · OSS · multi-architecture103 KiB590 KiBlist of filesghc-streaming-0.2.3.1-bp156.3.4.aarch64.rpm
0.2.3.1-bp156.3.4leap-15.6 / ossppc64leopenSUSE Leap 15.6 · OSS · multi-architecture107 KiB717 KiBlist of filesghc-streaming-0.2.3.1-bp156.3.4.ppc64le.rpm
0.2.3.1-bp156.3.4leap-15.6 / osss390xopenSUSE Leap 15.6 · OSS · multi-architecture149 KiB949 KiBlist of filesghc-streaming-0.2.3.1-bp156.3.4.s390x.rpm
0.2.3.1-bp156.3.4leap-15.6 / ossx86_64openSUSE Leap 15.6 · OSS · multi-architecture89 KiB441 KiBlist of filesghc-streaming-0.2.3.1-bp156.3.4.x86_64.rpm
About these downloads

Chaque ligne est une métadonnée d'index pour une version, une architecture, une suite et un dépôt. Noms, URL et tailles viennent de la source ; un lien est un emplacement de récupération mutable, pas une redistribution OpenFactory.

Other packages built from ghc-streaming

Dependencies and recommendations for ghc-streaming

View 16 package relationships
  • dep: libHSarray-0.5.4.0-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHSbase-4.14.3.0-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHSbase-orphans-0.9.1-c9SWeL8IJjH2h1UCckt6-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHScontainers-0.6.5.1-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHSdeepseq-1.4.4.0-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHSghc-prim-0.6.1-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHSinteger-gmp-1.0.3.0-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHSmmorph-1.2.0-725FHwcifUtIEv1dBHei5E-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHSmtl-2.2.2-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHSstm-2.5.0.1-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHStransformers-0.5.6.2-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHStransformers-base-0.4.6-LLu0NXvw3mID0pTTzLzopF-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libHStransformers-compat-0.7.2-1KC3IXOcuxMEnmo4oqBwTm-ghc8.10.7.so()(64bit)

    Package not available

  • dep: libgmp.so.10()(64bit)

    Package not available

  • dep: libm.so.6()(64bit)

    Package not available

  • dep: libc.so.6(GLIBC_2.17)(64bit)

    Package not available

Chemins de fichiers du paquet (4)

Paths come from the repository package-file index for the observed builds. They describe archive/package associations, not every file that will exist on a running system after maintainer scripts, alternatives, generated state, diversions, or installation choices.

  • /usr/lib64/ghc-8.10.7/streaming-0.2.3.1
  • /usr/lib64/ghc-8.10.7/streaming-0.2.3.1/libHSstreaming-0.2.3.1-B6sp2sjvlJ66sOMUlsH5bv-ghc8.10.7.so
  • /usr/share/licenses/ghc-streaming
  • /usr/share/licenses/ghc-streaming/LICENSE

Field source: openSUSE Leap 15.6 OSS

Vulnérabilités connues

Aucun avis correspondant dans les sources suivies.

Dernière synchronisation:

[Catalogue CVE]

Empreintes

Repository signatures authenticate metadata. Artifact hashing is recorded separately. Neither establishes package safety.

0.2.3.1-bp156.3.4 / aarch64Observé Sep 1, 2026sha512 23e8c66bede1…849506a2Empreinte publiée par la source

Metadata observed; artifact bytes were not independently fetched or hashed by this catalog import. The digest below is source-reported.

Empreinte publiée par la source (sha512): 23e8c66bede1c9397fd99760b19ea87980d844f04ca6346d491dd4b9fd65e79414b2f38007a7c48aeeb2657d5944b293d0a28157d618da5996f99e74849506a2

Field source: openSUSE Leap 15.6 OSS

0.2.3.1-bp156.3.4 / ppc64leObservé Sep 1, 2026sha512 7675644c033f…c5b036edEmpreinte publiée par la source

Metadata observed; artifact bytes were not independently fetched or hashed by this catalog import. The digest below is source-reported.

Empreinte publiée par la source (sha512): 7675644c033f4e53481b21c4f3eee4d4a1a100cbee19fb4cb03f5ed2b9da44013b05ca1df0bcd8cbfaca603854f008ebf9809615514d9503d69eb250c5b036ed

Field source: openSUSE Leap 15.6 OSS

0.2.3.1-bp156.3.4 / s390xObservé Sep 1, 2026sha512 ea23cbcee4ab…b84dbc6eEmpreinte publiée par la source

Metadata observed; artifact bytes were not independently fetched or hashed by this catalog import. The digest below is source-reported.

Empreinte publiée par la source (sha512): ea23cbcee4ab389958e10668239c7992bd79c4bab39f6cbfaf78d62f237b5a7f66b490436006840d880d6dd9cfeabca09bee57a9115b09a603742064b84dbc6e

Field source: openSUSE Leap 15.6 OSS

0.2.3.1-bp156.3.4 / x86_64Observé Sep 1, 2026sha512 036a7b3a3a53…212d9d92Empreinte publiée par la source

Metadata observed; artifact bytes were not independently fetched or hashed by this catalog import. The digest below is source-reported.

Empreinte publiée par la source (sha512): 036a7b3a3a5393f6792df0e8c978a7f4f8a38c4cc8f400033dc51772b852317c6ef104d57ee4a514c7e348f97bcb031d07f43e68c0d3a1d6c027decd212d9d92

Field source: openSUSE Leap 15.6 OSS

Sources

  • Authoritative source; repository metadata signature verified

    Preuve de signature

    leap-15-6-oss-multiarch:ca2653101b9afba6656aea529109ba0c0f1ca1a92aa8614e7c887fda5264c230

    Repository-signature verification record
    Signed-object SHA-256
    ca2653101b9afba6656aea529109ba0c0f1ca1a92aa8614e7c887fda5264c230
    Signer fingerprint
    AD485664E901B867051AB15F35A2F86E29B700A4
    Keyring revision
    opensuse-project-signing-key.asc
    SHA-256 b5745739ebfb95b25b8e810f9bcb847fe750ccda598bd85f02f0e974599a6d7e
    Tool and policy
    gpgv (GnuPG) 2.4.9
    openfactory-software-catalog-signature-v1
    Verification time
    Sep 1, 2026
    Repository metadata hash linkage
    Result
    Recorded as verified; digest details unavailable

Utiliser ce paquet

OpenFactory peut démarrer ce système d'exploitation dans une machine virtuelle du navigateur, ou lancer une construction qui inclut le nom natif du paquet de cet enregistrement.