on master help sign in
Improve docs, comments in export list
8fa3184Harendra Kumar
core/src/Streamly/Internal/Data/Parser/ParserD.hs+16−10
@@ -119,9 +119,10 @@ module Streamly.Internal.Data.Parser.ParserD
119 , takeWhile1
119 , takeWhile1
120 , dropWhile
120 , dropWhile
121
121
122− -- ** Single Element Separators
122+ -- ** Separated by elements
123 -- | Separator could be in prefix postion ('takeStartBy'), or suffix
123 -- | Separator could be in prefix postion ('takeStartBy'), or suffix
124− -- position ('takeEndBy').
124+ -- position ('takeEndBy'). See 'deintercalate', 'sepBy' etc for infix
125+ -- separator parsing, also see 'intersperseQuotedBy' fold.
125
126
126 -- These can be implemented modularly with refolds, using takeWhile and
127 -- These can be implemented modularly with refolds, using takeWhile and
127 -- satisfy.
128 -- satisfy.
@@ -134,19 +135,24 @@ module Streamly.Internal.Data.Parser.ParserD
134 , takeEitherSepBy
135 , takeEitherSepBy
135 , wordBy
136 , wordBy
136
137
137− -- ** By comparing
138+ -- ** Grouped by element comparison
138 , groupBy
139 , groupBy
139 , groupByRolling
140 , groupByRolling
140 , groupByRollingEither
141 , groupByRollingEither
141
142
142− -- ** Framing
143+ -- ** Framed by elements
144+ -- | Also see 'intersperseQuotedBy' fold.
145+ -- Framed by a one or more ocurrences of a separator around a word like
146+ -- spaces or quotes. No nesting.
147+ , wordFramedBy -- XXX Remove this? Covered by wordWithQuotes?
148+ , wordWithQuotes
149+ , wordStripQuotes
150+
151+ -- Framed by separate start and end characters, potentially nested.
143 -- , takeFramedBy
152 -- , takeFramedBy
144 , takeFramedBy_
153 , takeFramedBy_
145 , takeFramedByEsc_
154 , takeFramedByEsc_
146 , takeFramedByGeneric
155 , takeFramedByGeneric
147− , wordFramedBy
148− , wordWithQuotes
149− , wordStripQuotes
150 , blockWithQuotes
156 , blockWithQuotes
151
157
152 -- Matching strings
158 -- Matching strings
@@ -1029,9 +1035,9 @@ data FramedEscState s =
1029-- XXX We can remove Maybe from esc
1035-- XXX We can remove Maybe from esc
1030{-# INLINE takeFramedByGeneric #-}
1036{-# INLINE takeFramedByGeneric #-}
1031takeFramedByGeneric :: Monad m =>
1037takeFramedByGeneric :: Monad m =>
1032− Maybe (a -> Bool)
1038+ Maybe (a -> Bool) -- is escape char?
1033− -> Maybe (a -> Bool)
1039+ -> Maybe (a -> Bool) -- is frame begin?
1034− -> Maybe (a -> Bool)
1040+ -> Maybe (a -> Bool) -- is frame end?
1035 -> Fold m a b
1041 -> Fold m a b
1036 -> Parser a m b
1042 -> Parser a m b
1037takeFramedByGeneric esc begin end (Fold fstep finitial fextract) =
1043takeFramedByGeneric esc begin end (Fold fstep finitial fextract) =