Portability | untested |
---|---|
Stability | experimental |
Maintainer | twanvl@gmail.com |
Fusable loop functions, mirrors Data.ByteString.Fusion.
- loopAcc :: PairS acc arr -> acc
- loopArr :: PairS acc arr -> arr
- data NoAcc = NoAcc
- foldEFL :: (acc -> Char -> acc) -> AccEFL acc
- mapEFL :: (Char -> Char) -> AccEFL NoAcc
- filterEFL :: (Char -> Bool) -> AccEFL NoAcc
- scanEFL :: (Char -> Char -> Char) -> AccEFL Char
- mapAccumEFL :: (acc -> Char -> (acc, Char)) -> AccEFL acc
- mapIndexEFL :: (Int -> Char -> Char) -> AccEFL Int
- loopUp :: Encoding a => AccEFL acc -> acc -> CompactString a -> PairS acc (CompactString a)
- loopUpC :: Encoding a => AccEFL acc -> acc -> CompactString a -> PairS acc (CompactString a)
- loopDown :: Encoding a => AccEFL acc -> acc -> CompactString a -> PairS acc (CompactString a)
- loopUpFold :: Encoding a => FoldEFL acc -> acc -> CompactString a -> acc
- loopDownFold :: Encoding a => FoldEFL acc -> acc -> CompactString a -> acc
Documentation
loopArr :: PairS acc arr -> arrSource
Projection functions that are fusion friendly (as in, we determine when they are inlined)
Data type for accumulators which can be ignored. The rewrite rules rely on
the fact that no bottoms of this type are ever constructed; hence, we can
assume (_ :: NoAcc)
.
seq
x = x
mapAccumEFL :: (acc -> Char -> (acc, Char)) -> AccEFL accSource
Element function implementing a map and fold
mapIndexEFL :: (Int -> Char -> Char) -> AccEFL IntSource
Element function implementing a map with index
loopUp :: Encoding a => AccEFL acc -> acc -> CompactString a -> PairS acc (CompactString a)Source
loopUpC :: Encoding a => AccEFL acc -> acc -> CompactString a -> PairS acc (CompactString a)Source
like loopUp, but the size of the buffer can only become smaller
loopDown :: Encoding a => AccEFL acc -> acc -> CompactString a -> PairS acc (CompactString a)Source
loopUpFold :: Encoding a => FoldEFL acc -> acc -> CompactString a -> accSource
loopDownFold :: Encoding a => FoldEFL acc -> acc -> CompactString a -> accSource