Skip to content

Commit 1970a02

Browse files
Update types and modules in a non-table format
1 parent 50a0f96 commit 1970a02

File tree

1 file changed

+76
-50
lines changed

1 file changed

+76
-50
lines changed
Lines changed: 76 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Types and Modules at a Glance
1+
# Streamly: Types & Modules Cheat Sheet
2+
3+
This guide gives you a quick overview of Streamly’s core modules,
4+
types, and their typical use cases. Use it as a reference map when
5+
navigating the library.
26

37
## streamly-core package
48

@@ -10,67 +14,89 @@
1014

1115
## Streams
1216

13-
The following table lists the modules and types for monadic stream producers
14-
(streams), stream transformers (scans), stream consumers (folds and parsers).
17+
### Sources
18+
- `Stream m a` — statically fused, composable source streams<br>
19+
**Module:** `Streamly.Data.Stream`
20+
- `Unfold m a b` — statically fused streams, for nested fusion<br>
21+
**Module:** `Streamly.Data.Unfold`
22+
- `StreamK m a` — CPS based source streams for dynamic composition<br>
23+
**Module:** `Streamly.Data.StreamK`
24+
25+
### Transformations
26+
27+
- `Scanl m a b` — statically fused scans, for composable stateful transformation<br>
28+
**Module:** `Streamly.Data.Scanl`
29+
30+
### Consumers
1531

16-
| Module | Type | Description |
17-
|-----------------------|---------------|------------------------------------------------------------|
18-
| Streamly.Data.Stream | Stream m a | Streams using stream fusion, for static composition |
19-
| Streamly.Data.Unfold | Unfold m a b | Streams using nested stream fusion, for static composition |
20-
| Streamly.Data.StreamK | StreamK m a | Streams using CPS, for dynamic composition |
21-
| Streamly.Data.Scanl | Scanl m a b | Scans using stream fusion, for static composition |
22-
| Streamly.Data.Fold | Fold m a b | Folds using stream fusion, for static composition |
23-
| Streamly.Data.Parser | Parser a m b | Parsers using stream fusion, for static composition |
24-
| Streamly.Data.ParserK | ParserK a m b | Parsers using CPS, for dynamic composition |
32+
- `Fold m a b` — statically fused, composable stream consumers<br>
33+
**Module:** `Streamly.Data.Fold`
34+
- `Parser a m b` — statically fused, composable parsers<br>
35+
**Module:** `Streamly.Data.Parser`
36+
- `ParserK a m b` — CPS based parsers for dynamic composition<br>
37+
**Module:** `Streamly.Data.ParserK`
38+
39+
---
2540

2641
## Arrays
2742

28-
| Module | Type | Description |
29-
|------------------------------------------|--------------|------------------------------------------------|
30-
| Streamly.Data.Array | Array a | Immutable, unboxed, pinned and unpinned arrays |
31-
| Streamly.Data.MutArray | MutArray a | Mutable, unboxed, pinned and unpinned arrays |
32-
| Streamly.Data.Array.Generic | Array a | Immutable, boxed arrays |
33-
| Streamly.Data.MutArray.Generic | MutArray a | Mutable, boxed arrays |
34-
| Streamly.Data.MutByteArray | MutByteArray | Mutable byte arrays |
35-
| | Unbox a | Fixed length data serialization |
36-
| | Serialize a | Variable length data serialization |
37-
| Streamly.Data.RingArray | RingArray a | Unboxed ring buffer |
38-
| Streamly.Data.RingArray.Generic | RingArray a | Boxed ring buffer |
43+
### Immutable
44+
45+
- `Array a => Unbox a` — immutable, unboxed (pinned/unpinned)<br>
46+
**Module:** `Streamly.Data.Array`
47+
- `Array a` — unconstrained type<br>
48+
**Module:** `Streamly.Data.Array.Generic`
49+
50+
### Mutable
51+
52+
- `MutArray a => Unbox a` — mutable, unboxed (pinned/unpinned)<br>
53+
**Module:** `Streamly.Data.MutArray`
54+
- `MutArray a` — unconstrained type<br>
55+
**Module:** `Streamly.Data.MutArray.Generic`
56+
- `RingArray a => Unbox a` — unboxed, circular buffer (pinned/unpinned)<br>
57+
**Module:** `Streamly.Data.RingArray`
58+
59+
### Serialization
60+
61+
- `Unbox a` — type class for fixed length binary serialization<br>
62+
**Module:** `Streamly.Data.MutByteArray`
63+
- `Serialize a` — type class for variable length binary serialization<br>
64+
**Module:** `Streamly.Data.MutByteArray`
65+
- `MutByteArray` — raw mutable byte arrays<br>
66+
**Module:** `Streamly.Data.MutByteArray`
67+
68+
---
3969

4070
## Unicode Operations
4171

42-
| Module | Description |
43-
|-------------------------|--------------------------------------------|
44-
| Streamly.Unicode.Stream | Unicode stream operations, encode, decode |
45-
| Streamly.Unicode.Parser | Parsers for Unicode characters and strings |
46-
| Streamly.Unicode.String | String interpolation |
72+
- `Streamly.Unicode.Stream` — encode/decode streams of text
73+
- `Streamly.Unicode.Parser` — parsers for Unicode chars/strings
74+
- `Streamly.Unicode.String` — string interpolation utilities
75+
76+
---
77+
78+
## Concurrent Operations
4779

48-
## Concurrency Operations
80+
High-level concurrent, time-based, and lifted operations.
4981

50-
High level stream operations including concurrent, time and lifted functions:
82+
- `Streamly.Data.Stream.Prelude` — concurrent operations for `Stream` type
83+
- `Streamly.Data.Scanl.Prelude` — concurrent operations for `Scanl` type
84+
- `Streamly.Data.Fold.Prelude` — concurrent operations for `Fold` type
85+
- `Streamly.Data.Stream.MkType` — define custom monad/applicative stream types
5186

52-
| Module | Description |
53-
|------------------------------|-----------------------------------------------------|
54-
| Streamly.Data.Stream.Prelude | Concurrent stream sources, time related operations |
55-
| Streamly.Data.Scanl.Prelude | Concurrent, composable stream pipes |
56-
| Streamly.Data.Fold.Prelude | Concurrent, composable stream consumers |
57-
| Streamly.Data.Stream.MkType | Make custom monad and applicative types for streams |
87+
---
5888

59-
## File System Operations
89+
## File System
6090

61-
Console and file system operations:
91+
- `Streamly.Console.Stdio` — console (stdin/stdout/stderr) streams
92+
- `Streamly.FileSystem.Handle` — handle-based I/O streams
93+
- `Streamly.FileSystem.FileIO` — path-based file I/O streams
94+
- `Streamly.FileSystem.DirIO` — directory read streams
95+
- `Streamly.FileSystem.Path` — file path operations
6296

63-
| Module | Description |
64-
|----------------------------|--------------------------------------------------|
65-
| Streamly.Console.Stdio | Console standard input, output, error operations |
66-
| Streamly.FileSystem.Handle | Handle based read/write operations |
67-
| Streamly.FileSystem.FileIO | File path based read, write operations |
68-
| Streamly.FileSystem.DirIO | Directory read operations |
69-
| Streamly.FileSystem.Path | File path representation and operations |
97+
---
7098

71-
## Network Operations
99+
## Network
72100

73-
| Module | Description |
74-
|------------------------------|-----------------------------------------------|
75-
| Streamly.Network.Socket | Socket level stream operations |
76-
| Streamly.Network.Inet.TCP | TCP level stream operations (accept, connect) |
101+
- `Streamly.Network.Socket` — socket-level stream operations
102+
- `Streamly.Network.Inet.TCP` — TCP accept streams/connect

0 commit comments

Comments
 (0)