on master help sign in
rename Parser module to ParserD
a03e287Harendra Kumar
benchmark/Chart.hs+7−7
@@ -28,7 +28,7 @@ data BenchType
28 | LinearAsync
28 | LinearAsync
29 | LinearRate
29 | LinearRate
30 | NestedConcurrent
30 | NestedConcurrent
31− | Parser
31+ | ParserD
32 | ParserK
32 | ParserK
33 | Base
33 | Base
34 | FileIO
34 | FileIO
@@ -82,7 +82,7 @@ parseBench = do
82 Just "linear-async" -> setBenchType LinearAsync
82 Just "linear-async" -> setBenchType LinearAsync
83 Just "linear-rate" -> setBenchType LinearRate
83 Just "linear-rate" -> setBenchType LinearRate
84 Just "nested-concurrent" -> setBenchType NestedConcurrent
84 Just "nested-concurrent" -> setBenchType NestedConcurrent
85− Just "parser" -> setBenchType Parser
85+ Just "parserD" -> setBenchType ParserD
86 Just "parserK" -> setBenchType ParserK
86 Just "parserK" -> setBenchType ParserK
87 Just "base" -> setBenchType Base
87 Just "base" -> setBenchType Base
88 Just "fileio" -> setBenchType FileIO
88 Just "fileio" -> setBenchType FileIO
@@ -364,11 +364,11 @@ main = do
364 (makeStreamComparisonGraphs "nested-concurrent" nestedBenchPrefixes)
364 (makeStreamComparisonGraphs "nested-concurrent" nestedBenchPrefixes)
365 "charts/nested-concurrent/results.csv"
365 "charts/nested-concurrent/results.csv"
366 "charts/nested-concurrent"
366 "charts/nested-concurrent"
367− Parser -> benchShow opts cfg
367+ ParserD -> benchShow opts cfg
368− { title = Just "Parsers" }
368+ { title = Just "ParserD" }
369− (makeGraphs "parser")
369+ (makeGraphs "parserD")
370− "charts/parser/results.csv"
370+ "charts/parserD/results.csv"
371− "charts/parser"
371+ "charts/parserD"
372 ParserK -> benchShow opts cfg
372 ParserK -> benchShow opts cfg
373 { title = Just "ParserK" }
373 { title = Just "ParserK" }
374 (makeGraphs "parserK")
374 (makeGraphs "parserK")
benchmark/Streamly/Benchmark/Data/Parser.hs → benchmark/Streamly/Benchmark/Data/ParserD.hsrenamed+2−2
@@ -1,5 +1,5 @@
1-- |
1-- |
2−-- Module : Streamly.Benchmark.Data.Parser
2+-- Module : Streamly.Benchmark.Data.ParserD
3-- Copyright : (c) 2020 Composewell Technologies
3-- Copyright : (c) 2020 Composewell Technologies
4--
4--
5-- License : MIT
5-- License : MIT
@@ -24,7 +24,7 @@ import qualified Control.Applicative as AP
24import qualified Streamly as S hiding (runStream)
24import qualified Streamly as S hiding (runStream)
25import qualified Streamly.Prelude as S
25import qualified Streamly.Prelude as S
26import qualified Streamly.Internal.Data.Fold as FL
26import qualified Streamly.Internal.Data.Fold as FL
27−import qualified Streamly.Internal.Data.Parser as PR
27+import qualified Streamly.Internal.Data.Parser.ParserD as PR
28import qualified Streamly.Internal.Prelude as IP
28import qualified Streamly.Internal.Prelude as IP
29
29
30import Gauge
30import Gauge
benchmark/Streamly/Benchmark/Data/ParserK.hs+2−2
@@ -22,8 +22,8 @@ import qualified Data.Traversable as TR
22import qualified Control.Applicative as AP
22import qualified Control.Applicative as AP
23import qualified Streamly as S hiding (runStream)
23import qualified Streamly as S hiding (runStream)
24import qualified Streamly.Prelude as S
24import qualified Streamly.Prelude as S
25−import qualified Streamly.Internal.Data.ParserK.Types as PR
25+import qualified Streamly.Internal.Data.Parser.ParserK.Types as PR
26−import qualified Streamly.Internal.Data.Parser as PRD
26+import qualified Streamly.Internal.Data.Parser.ParserD as PRD
27import qualified Streamly.Internal.Prelude as IP
27import qualified Streamly.Internal.Prelude as IP
28
28
29import Gauge
29import Gauge
benchmark/Streamly/Benchmark/FileIO/Stream.hs+1−1
@@ -88,7 +88,7 @@ import qualified Streamly.Data.Unicode.Stream as SS
88import qualified Streamly.Internal.Data.Unicode.Stream as IUS
88import qualified Streamly.Internal.Data.Unicode.Stream as IUS
89import qualified Streamly.Internal.Memory.Unicode.Array as IUA
89import qualified Streamly.Internal.Memory.Unicode.Array as IUA
90import qualified Streamly.Internal.Data.Unfold as IUF
90import qualified Streamly.Internal.Data.Unfold as IUF
91−import qualified Streamly.Internal.Data.Parser as PR
91+import qualified Streamly.Internal.Data.Parser.ParserD as PR
92import qualified Streamly.Internal.Prelude as IP
92import qualified Streamly.Internal.Prelude as IP
93import qualified Streamly.Internal.Data.Stream.StreamD as D
93import qualified Streamly.Internal.Data.Stream.StreamD as D
94
94
benchmark/streamly-benchmarks.cabal+2−2
@@ -247,12 +247,12 @@ benchmark unfold
247 else
247 else
248 buildable: True
248 buildable: True
249
249
250−benchmark parser
250+benchmark parserD
251 import: bench-options
251 import: bench-options
252 type: exitcode-stdio-1.0
252 type: exitcode-stdio-1.0
253 ghc-options: -with-rtsopts "-T -K36K -M16M"
253 ghc-options: -with-rtsopts "-T -K36K -M16M"
254 hs-source-dirs: ., Streamly/Benchmark/Data
254 hs-source-dirs: ., Streamly/Benchmark/Data
255− main-is: Parser.hs
255+ main-is: ParserD.hs
256 if impl(ghcjs)
256 if impl(ghcjs)
257 buildable: False
257 buildable: False
258 else
258 else
src/Streamly/Internal/Data/Parser.hs → src/Streamly/Internal/Data/Parser/ParserD.hsrenamed+5−5
@@ -3,7 +3,7 @@
3{-# LANGUAGE ScopedTypeVariables #-}
3{-# LANGUAGE ScopedTypeVariables #-}
4
4
5-- |
5-- |
6−-- Module : Streamly.Internal.Data.Parser
6+-- Module : Streamly.Internal.Data.Parser.ParserD
7-- Copyright : (c) 2020 Composewell Technologies
7-- Copyright : (c) 2020 Composewell Technologies
8-- License : BSD3
8-- License : BSD3
9-- Maintainer : streamly@composewell.com
9-- Maintainer : streamly@composewell.com
@@ -36,7 +36,7 @@
36-- "Text.ParserCombinators.ReadP/parser-combinators/parsec/megaparsec/attoparsec"
36-- "Text.ParserCombinators.ReadP/parser-combinators/parsec/megaparsec/attoparsec"
37-- have consistent names. takeP/takeWhileP/munch?
37-- have consistent names. takeP/takeWhileP/munch?
38
38
39−module Streamly.Internal.Data.Parser
39+module Streamly.Internal.Data.Parser.ParserD
40 (
40 (
41 Parser (..)
41 Parser (..)
42
42
@@ -183,11 +183,11 @@ import Prelude
183
183
184import Streamly.Internal.Data.Fold.Types (Fold(..))
184import Streamly.Internal.Data.Fold.Types (Fold(..))
185
185
186−import qualified Streamly.Internal.Data.ParserK.Types as K
186+import qualified Streamly.Internal.Data.Parser.ParserK.Types as K
187import qualified Streamly.Internal.Data.Zipper as Z
187import qualified Streamly.Internal.Data.Zipper as Z
188
188
189−import Streamly.Internal.Data.Parser.Tee
189+import Streamly.Internal.Data.Parser.ParserD.Tee
190−import Streamly.Internal.Data.Parser.Types
190+import Streamly.Internal.Data.Parser.ParserD.Types
191import Streamly.Internal.Data.Strict
191import Streamly.Internal.Data.Strict
192
192
193-------------------------------------------------------------------------------
193-------------------------------------------------------------------------------
src/Streamly/Internal/Data/Parser/Tee.hs → src/Streamly/Internal/Data/Parser/ParserD/Tee.hsrenamed+4−3
@@ -8,7 +8,7 @@
8#include "inline.hs"
8#include "inline.hs"
9
9
10-- |
10-- |
11−-- Module : Streamly.Internal.Data.Parser.Tee
11+-- Module : Streamly.Internal.Data.Parser.ParserD.Tee
12-- Copyright : (c) 2020 Composewell Technologies
12-- Copyright : (c) 2020 Composewell Technologies
13-- License : BSD3
13-- License : BSD3
14-- Maintainer : streamly@composewell.com
14-- Maintainer : streamly@composewell.com
@@ -29,7 +29,7 @@
29-- some legit warnings, therefore, we have segregated only the code that uses
29-- some legit warnings, therefore, we have segregated only the code that uses
30-- uni-pattern matches in this module.
30-- uni-pattern matches in this module.
31
31
32−module Streamly.Internal.Data.Parser.Tee
32+module Streamly.Internal.Data.Parser.ParserD.Tee
33 (
33 (
34 -- Parallel zipped
34 -- Parallel zipped
35 teeWith
35 teeWith
@@ -48,7 +48,8 @@ import Prelude
48 hiding (any, all, takeWhile)
48 hiding (any, all, takeWhile)
49
49
50import Fusion.Plugin.Types (Fuse(..))
50import Fusion.Plugin.Types (Fuse(..))
51−import Streamly.Internal.Data.Parser.Types (Parser(..), Step(..), ParseError)
51+import Streamly.Internal.Data.Parser.ParserD.Types
52+ (Parser(..), Step(..), ParseError)
52
53
53-------------------------------------------------------------------------------
54-------------------------------------------------------------------------------
54-- Distribute input to two parsers and collect both results
55-- Distribute input to two parsers and collect both results
src/Streamly/Internal/Data/Parser/Types.hs → src/Streamly/Internal/Data/Parser/ParserD/Types.hsrenamed+2−2
@@ -2,7 +2,7 @@
2{-# LANGUAGE ScopedTypeVariables #-}
2{-# LANGUAGE ScopedTypeVariables #-}
3
3
4-- |
4-- |
5−-- Module : Streamly.Parser.Types
5+-- Module : Streamly.Internal.Data.Parser.ParserD.Types
6-- Copyright : (c) 2020 Composewell Technologies
6-- Copyright : (c) 2020 Composewell Technologies
7-- License : BSD3
7-- License : BSD3
8-- Maintainer : streamly@composewell.com
8-- Maintainer : streamly@composewell.com
@@ -107,7 +107,7 @@
107-- merge the resulting streams using different merge strategies (e.g.
107-- merge the resulting streams using different merge strategies (e.g.
108-- interleaving or serial).
108-- interleaving or serial).
109
109
110−module Streamly.Internal.Data.Parser.Types
110+module Streamly.Internal.Data.Parser.ParserD.Types
111 (
111 (
112 Step (..)
112 Step (..)
113 , Parser (..)
113 , Parser (..)
src/Streamly/Internal/Data/ParserK/Types.hs → src/Streamly/Internal/Data/Parser/ParserK/Types.hsrenamed+2−2
@@ -6,7 +6,7 @@
6#include "inline.hs"
6#include "inline.hs"
7
7
8-- |
8-- |
9−-- Module : Streamly.ParserK.Types
9+-- Module : Streamly.Internal.Data.Parser.ParserK.Types
10-- Copyright : (c) 2020 Composewell Technologies
10-- Copyright : (c) 2020 Composewell Technologies
11-- License : BSD3
11-- License : BSD3
12-- Maintainer : streamly@composewell.com
12-- Maintainer : streamly@composewell.com
@@ -15,7 +15,7 @@
15--
15--
16-- CPS style implementation of parsers.
16-- CPS style implementation of parsers.
17
17
18−module Streamly.Internal.Data.ParserK.Types
18+module Streamly.Internal.Data.Parser.ParserK.Types
19 (
19 (
20 Parser (..)
20 Parser (..)
21 )
21 )
src/Streamly/Internal/Data/Stream/Prelude.hs+1−1
@@ -74,7 +74,7 @@ import Prelude hiding (foldr, minimum, maximum)
74import qualified Prelude
74import qualified Prelude
75
75
76import Streamly.Internal.Data.Fold.Types (Fold (..))
76import Streamly.Internal.Data.Fold.Types (Fold (..))
77−import Streamly.Internal.Data.Parser.Types (Step)
77+import Streamly.Internal.Data.Parser.ParserD.Types (Step)
78
78
79#ifdef USE_STREAMK_ONLY
79#ifdef USE_STREAMK_ONLY
80import qualified Streamly.Internal.Data.Stream.StreamK as S
80import qualified Streamly.Internal.Data.Stream.StreamK as S
src/Streamly/Internal/Data/Stream/StreamD.hs+2−2
@@ -362,7 +362,7 @@ import Streamly.Internal.Data.Time.Units
362import Streamly.Internal.Data.Atomics (atomicModifyIORefCAS_)
362import Streamly.Internal.Data.Atomics (atomicModifyIORefCAS_)
363import Streamly.Internal.Memory.Array.Types (Array(..))
363import Streamly.Internal.Memory.Array.Types (Array(..))
364import Streamly.Internal.Data.Fold.Types (Fold(..))
364import Streamly.Internal.Data.Fold.Types (Fold(..))
365−import Streamly.Internal.Data.Parser.Types (Parser(..), ParseError(..))
365+import Streamly.Internal.Data.Parser.ParserD.Types (Parser(..), ParseError(..))
366import Streamly.Internal.Data.Pipe.Types (Pipe(..), PipeState(..))
366import Streamly.Internal.Data.Pipe.Types (Pipe(..), PipeState(..))
367import Streamly.Internal.Data.Time.Clock (Clock(Monotonic), getTime)
367import Streamly.Internal.Data.Time.Clock (Clock(Monotonic), getTime)
368import Streamly.Internal.Data.Time.Units
368import Streamly.Internal.Data.Time.Units
@@ -379,7 +379,7 @@ import qualified Streamly.Internal.Memory.Array.Types as A
379import qualified Streamly.Internal.Data.Fold as FL
379import qualified Streamly.Internal.Data.Fold as FL
380import qualified Streamly.Memory.Ring as RB
380import qualified Streamly.Memory.Ring as RB
381import qualified Streamly.Internal.Data.Stream.StreamK as K
381import qualified Streamly.Internal.Data.Stream.StreamK as K
382−import qualified Streamly.Internal.Data.Parser.Types as PR
382+import qualified Streamly.Internal.Data.Parser.ParserD.Types as PR
383
383
384------------------------------------------------------------------------------
384------------------------------------------------------------------------------
385-- Construction
385-- Construction
src/Streamly/Internal/Data/Zipper.hs+1−1
@@ -76,7 +76,7 @@ import Prelude hiding (splitAt)
76import Streamly.Internal.Data.Stream.StreamK.Type (Stream(..))
76import Streamly.Internal.Data.Stream.StreamK.Type (Stream(..))
77import Streamly.Internal.Data.SVar (defState)
77import Streamly.Internal.Data.SVar (defState)
78
78
79−import qualified Streamly.Internal.Data.Parser.Types as PR
79+import qualified Streamly.Internal.Data.Parser.ParserD.Types as PR
80import qualified Streamly.Internal.Data.Stream.StreamK as K
80import qualified Streamly.Internal.Data.Stream.StreamK as K
81
81
82-------------------------------------------------------------------------------
82-------------------------------------------------------------------------------
src/Streamly/Internal/Prelude.hs+2−2
@@ -540,7 +540,7 @@ import qualified System.IO as IO
540
540
541import Streamly.Internal.Data.Stream.Enumeration (Enumerable(..), enumerate, enumerateTo)
541import Streamly.Internal.Data.Stream.Enumeration (Enumerable(..), enumerate, enumerateTo)
542import Streamly.Internal.Data.Fold.Types (Fold (..), Fold2 (..))
542import Streamly.Internal.Data.Fold.Types (Fold (..), Fold2 (..))
543−import Streamly.Internal.Data.Parser.Types (Parser (..))
543+import Streamly.Internal.Data.Parser.ParserD.Types (Parser (..))
544import Streamly.Internal.Data.Unfold.Types (Unfold)
544import Streamly.Internal.Data.Unfold.Types (Unfold)
545import Streamly.Internal.Memory.Array.Types (Array, writeNUnsafe)
545import Streamly.Internal.Memory.Array.Types (Array, writeNUnsafe)
546-- import Streamly.Memory.Ring (Ring)
546-- import Streamly.Memory.Ring (Ring)
@@ -577,7 +577,7 @@ import qualified Streamly.Internal.Data.Stream.StreamD as S
577import qualified Streamly.Internal.Data.Stream.Serial as Serial
577import qualified Streamly.Internal.Data.Stream.Serial as Serial
578import qualified Streamly.Internal.Data.Stream.Parallel as Par
578import qualified Streamly.Internal.Data.Stream.Parallel as Par
579import qualified Streamly.Internal.Data.Stream.Zip as Z
579import qualified Streamly.Internal.Data.Stream.Zip as Z
580−import qualified Streamly.Internal.Data.ParserK.Types as PRK
580+import qualified Streamly.Internal.Data.Parser.ParserK.Types as PRK
581import qualified Streamly.Internal.Data.Zipper as ZR
581import qualified Streamly.Internal.Data.Zipper as ZR
582
582
583------------------------------------------------------------------------------
583------------------------------------------------------------------------------
streamly.cabal+24−10
@@ -315,6 +315,11 @@ library
315 , Streamly.Internal.Data.Time.Units
315 , Streamly.Internal.Data.Time.Units
316 , Streamly.Internal.Data.Time.Clock
316 , Streamly.Internal.Data.Time.Clock
317 , Streamly.Internal.Data.SVar
317 , Streamly.Internal.Data.SVar
318+
319+ -- Mutable data
320+ , Streamly.Internal.Mutable.Prim.Var
321+
322+ -- Arrays
318 , Streamly.Internal.Data.Array
323 , Streamly.Internal.Data.Array
319 , Streamly.Internal.Data.Prim.Array.Types
324 , Streamly.Internal.Data.Prim.Array.Types
320 , Streamly.Internal.Data.Prim.Array
325 , Streamly.Internal.Data.Prim.Array
@@ -323,16 +328,20 @@ library
323 , Streamly.Internal.Memory.Array.Types
328 , Streamly.Internal.Memory.Array.Types
324 , Streamly.Internal.Memory.Array
329 , Streamly.Internal.Memory.Array
325 , Streamly.Internal.Memory.ArrayStream
330 , Streamly.Internal.Memory.ArrayStream
331+
332+ -- Folds
326 , Streamly.Internal.Data.Fold.Types
333 , Streamly.Internal.Data.Fold.Types
327 , Streamly.Internal.Data.Fold
334 , Streamly.Internal.Data.Fold
328− , Streamly.Internal.Data.Zipper
329− , Streamly.Internal.Data.ParserK.Types
330− , Streamly.Internal.Data.Parser
331− , Streamly.Internal.Data.Parser.Types
332− , Streamly.Internal.Data.Parser.Tee
333 , Streamly.Internal.Data.Sink.Types
335 , Streamly.Internal.Data.Sink.Types
334 , Streamly.Internal.Data.Sink
336 , Streamly.Internal.Data.Sink
335
337
338+ -- Parsers
339+ , Streamly.Internal.Data.Zipper
340+ , Streamly.Internal.Data.Parser.ParserK.Types
341+ , Streamly.Internal.Data.Parser.ParserD.Types
342+ , Streamly.Internal.Data.Parser.ParserD.Tee
343+ , Streamly.Internal.Data.Parser.ParserD
344+
336 -- Base streams
345 -- Base streams
337 , Streamly.Internal.Data.Stream.StreamK.Type
346 , Streamly.Internal.Data.Stream.StreamK.Type
338 , Streamly.Internal.Data.Stream.StreamK
347 , Streamly.Internal.Data.Stream.StreamK
@@ -351,21 +360,26 @@ library
351 , Streamly.Internal.Data.Stream.Ahead
360 , Streamly.Internal.Data.Stream.Ahead
352 , Streamly.Internal.Data.Stream.Zip
361 , Streamly.Internal.Data.Stream.Zip
353 , Streamly.Internal.Data.Stream.Combinators
362 , Streamly.Internal.Data.Stream.Combinators
363+ , Streamly.Internal.Data.List
364+ , Streamly.Internal.Prelude
365+
366+ -- Unfolds
354 , Streamly.Internal.Data.Unfold.Types
367 , Streamly.Internal.Data.Unfold.Types
355 , Streamly.Internal.Data.Unfold
368 , Streamly.Internal.Data.Unfold
369+
370+ -- Pipes
356 , Streamly.Internal.Data.Pipe.Types
371 , Streamly.Internal.Data.Pipe.Types
357 , Streamly.Internal.Data.Pipe
372 , Streamly.Internal.Data.Pipe
358− , Streamly.Internal.Data.List
373+
374+ -- Filesystem
359 , Streamly.Internal.FileSystem.Handle
375 , Streamly.Internal.FileSystem.Handle
360 , Streamly.Internal.FileSystem.Dir
376 , Streamly.Internal.FileSystem.Dir
361 , Streamly.Internal.FileSystem.File
377 , Streamly.Internal.FileSystem.File
378+
379+ -- Text Processing
362 , Streamly.Internal.Data.Unicode.Stream
380 , Streamly.Internal.Data.Unicode.Stream
363 , Streamly.Internal.Data.Unicode.Char
381 , Streamly.Internal.Data.Unicode.Char
364 , Streamly.Internal.Memory.Unicode.Array
382 , Streamly.Internal.Memory.Unicode.Array
365− , Streamly.Internal.Prelude
366−
367− -- Mutable data
368− , Streamly.Internal.Mutable.Prim.Var
369
383
370 if !impl(ghcjs)
384 if !impl(ghcjs)
371 exposed-modules:
385 exposed-modules: