Text.Trifecta.Rope

trifecta-1.5.2: A modern parser combinator library with convenient diagnostics

Copyright | (C) 2011-2014 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | non-portable
Safe Haskell | Safe
Language | Haskell2010

Text.Trifecta.Rope

Description

Synopsis

- data Rope = Rope !Delta !(FingerTree Delta Strand)
- rope :: FingerTree Delta Strand -> Rope
- data Strand
  - = Strand !ByteString !Delta
  - | Skipping !Delta
- strand :: ByteString -> Strand
- strands :: Rope -> FingerTree Delta Strand
- grabRest :: Delta -> Rope -> r -> (Delta -> ByteString -> r) -> r
- grabLine :: Delta -> Rope -> r -> (Delta -> ByteString -> r) -> r

# Documentation

data Rope

Constructors

Rope !Delta !(FingerTree Delta Strand) |

Instances

Show Rope |
Monoid Rope |
Semigroup Rope |
HasDelta Rope |
HasBytes Rope |
Measured Delta Rope |
Reducer ByteString Rope |
Reducer Rope Rope |
Reducer Strand Rope |
Reducer [Char] Rope |

rope :: FingerTree Delta Strand -> Rope

data Strand

Constructors

Strand !ByteString !Delta |
Skipping !Delta |

Instances

Data Strand |
Show Strand |
Generic Strand |
Hashable Strand |
HasDelta Strand |
HasBytes Strand |
Measured Delta Strand |
Reducer Strand Rope |
type Rep Strand |

strand :: ByteString -> Strand

strands :: Rope -> FingerTree Delta Strand

grabRest :: Delta -> Rope -> r -> (Delta -> ByteString -> r) -> r

grab a the contents of a rope from a given location up to a newline

grabLine :: Delta -> Rope -> r -> (Delta -> ByteString -> r) -> r

grab a the contents of a rope from a given location up to a newline