text-2.0.2: An efficient packed Unicode text type.

Copyright | (c) Tom Harper 2008-2009 (c) Bryan O'Sullivan 2009 (c) Duncan Coutts 2009 (c) Jasper Van der Jeugt 2011
License | BSD-style
Maintainer | bos@serpentine.com
Stability | experimental
Portability | GHC
Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.Text.Internal.Fusion.Types

Description

Warning: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!

Core stream fusion functionality for text.

Synopsis

- data CC s = CC !s !Int64
- data PairS a b = !a :*: !b
- data Scan s
  - = Scan1 !Char !s
  - | Scan2 !Char !s
- data RS s
  - = RS0 !s
  - | RS1 !s !Word8
  - | RS2 !s !Word8 !Word8
  - | RS3 !s !Word8 !Word8 !Word8
- data Step s a
  - = Done
  - | Skip !s
  - | Yield !a !s
- data Stream a = forall s. Stream (s -> Step s a) !s !Size
- empty :: Stream a

# Documentation

data CC s Source #

Specialised tuple for case conversion.

Constructors

CC !s !Int64 |

data PairS a b Source #

Strict pair.

Constructors

!a :*: !b infixl 2 |

data Scan s Source #

An intermediate result in a scan.

Constructors

Scan1 !Char !s |
Scan2 !Char !s |

data RS s Source #

Restreaming state.

Constructors

RS0 !s |
RS1 !s !Word8 |
RS2 !s !Word8 !Word8 |
RS3 !s !Word8 !Word8 !Word8 |

data Step s a Source #

Intermediate result in a processing pipeline.

Constructors

Done |
Skip !s |
Yield !a !s |

data Stream a Source #

A co-recursive type yielding a single element at a time depending on the internal state it carries.

Constructors

forall s. Stream (s -> Step s a) !s !Size |

#### Instances

Instances details

Eq a => Eq (Stream a) Source # |
Instance details Defined in Data.Text.Internal.Fusion.Types Methods (==) :: Stream a -> Stream a -> Bool Source # (/=) :: Stream a -> Stream a -> Bool Source #
Ord a => Ord (Stream a) Source # |
Instance details Defined in Data.Text.Internal.Fusion.Types Methods compare :: Stream a -> Stream a -> Ordering Source # (<) :: Stream a -> Stream a -> Bool Source # (<=) :: Stream a -> Stream a -> Bool Source # (>) :: Stream a -> Stream a -> Bool Source # (>=) :: Stream a -> Stream a -> Bool Source # max :: Stream a -> Stream a -> Stream a Source # min :: Stream a -> Stream a -> Stream a Source #

empty :: Stream a Source #

The empty stream.