text-1.1.1.3: 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 | Haskell98

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 !Char !Char
- data M a
  - = N
  - | J !a
- type M8 = M Word8
- data PairS a b = !a :*: !b
- 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
- data Switch
  - = S1
  - | S2
- empty :: Stream a

# Documentation

data CC s

Specialised tuple for case conversion.

Constructors

CC !s !Char !Char |

data M a

Specialised, strict Maybe-like type.

Constructors

N |
J !a |

type M8 = M Word8

data PairS a b

Constructors

!a :*: !b infixl 2 |

data RS s

Constructors

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

data Step s a

Constructors

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

data Stream a

Constructors

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

Instances

Eq a => Eq (Stream a) |
Ord a => Ord (Stream a) |

data Switch

Allow a function over a stream to switch between two states.

Constructors

S1 |
S2 |

empty :: Stream a

The empty stream.