Skip to content

Commit 2bcecf4

Browse files
Move the common parser module under "Data" dir
1 parent b631e09 commit 2bcecf4

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

‎streamly.cabal‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ extra-source-files:
122122
test/Streamly/Test/Data/*.hs
123123
test/Streamly/Test/Data/Array/*.hs
124124
test/Streamly/Test/Data/MutArray/*.hs
125-
test/Streamly/Test/Data/Parser/*.hs
126125
test/Streamly/Test/Data/Stream/*.hs
127126
test/Streamly/Test/Data/Stream/Serial/Common.hs
128127
test/Streamly/Test/FileSystem/Event.hs

‎test/Streamly/Test/Data/Parser.hs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Test.QuickCheck.Monadic (monadicIO, assert, run)
2020

2121
import Prelude hiding (sequence)
2222

23-
import qualified Streamly.Test.Data.Parser.Common as Common
23+
import qualified Streamly.Test.Data.ParserCommon as Common
2424
import qualified Streamly.Data.Stream as S
2525
import qualified Streamly.Internal.Data.Array as A
2626
import qualified Streamly.Internal.Data.Fold as FL
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#if __GLASGOW_HASKELL__ >= 908
44
{-# OPTIONS_GHC -Wno-x-partial #-}
55
#endif
6-
module Streamly.Test.Data.Parser.Common (main) where
6+
module Streamly.Test.Data.ParserCommon (main) where
77

88
import Control.Applicative ((<|>))
99
import Control.Exception (displayException, try, evaluate, SomeException)
@@ -16,7 +16,7 @@ import Test.QuickCheck
1616
vectorOf, Gen, (.&&.), ioProperty)
1717
import Test.QuickCheck.Monadic (monadicIO, assert, run, PropertyM)
1818

19-
import Prelude hiding (sequence)
19+
import Prelude hiding (sequence, take, takeWhile)
2020

2121
import qualified Control.Monad.Fail as Fail
2222
import qualified Data.List as List
@@ -1167,18 +1167,18 @@ mainCommon ptt = do
11671167
$ runParserTC_temp ptt takeBetweenPass
11681168
prop ("P.takeBetween = Prelude.take when len >= m and len <= n and fail"
11691169
++ "otherwise fail") $ runParserTC_temp ptt takeBetween
1170-
prop "P.take = Prelude.take" $ runParserTC_temp ptt Streamly.Test.Data.Parser.Common.take
1170+
prop "P.take = Prelude.take" $ runParserTC_temp ptt take
11711171
prop "P.takeEQ = Prelude.take when len >= n" $ runParserTC_temp ptt takeEQPass
11721172
prop "P.takeEQ = Prelude.take when len >= n and fail otherwise"
1173-
$ runParserTC_temp ptt Streamly.Test.Data.Parser.Common.takeEQ
1173+
$ runParserTC_temp ptt takeEQ
11741174
prop "P.takeGE n ls = ls when len >= n" $ runParserTC_temp ptt takeGEPass
1175-
prop "P.takeGE n ls = ls when len >= n and fail otherwise" $ runParserTC_temp ptt Streamly.Test.Data.Parser.Common.takeGE
1175+
prop "P.takeGE n ls = ls when len >= n and fail otherwise" $ runParserTC_temp ptt takeGE
11761176
prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n" $ runParserTC_temp ptt lookAheadPass
11771177
-- prop "Fail when stream length exceeded" lookAheadFail
11781178
prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n, else fail" $ runParserTC_temp ptt lookAhead
11791179
prop ("P.takeStartBy pred = head : Prelude.takeWhile (not . pred)"
11801180
++ " tail") $ runParserTC ptt takeStartBy
1181-
prop "P.takeWhile = Prelude.takeWhile" $ runParserTC ptt Streamly.Test.Data.Parser.Common.takeWhile
1181+
prop "P.takeWhile = Prelude.takeWhile" $ runParserTC ptt takeWhile
11821182
prop ("P.takeWhile1 = Prelude.takeWhile if taken something,"
11831183
++ " else check why failed") $ runParserTC ptt takeWhile1
11841184
prop "takeWhileP prd P.take = takeWhileMaxLen prd" $ runParserTC ptt takeWhileP

‎test/streamly-tests.cabal‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ test-suite Data.Parser
311311
type: exitcode-stdio-1.0
312312
main-is: Streamly/Test/Data/Parser.hs
313313
hs-source-dirs: .
314-
other-modules: Streamly.Test.Data.Parser.Common
314+
other-modules: Streamly.Test.Data.ParserCommon
315315
if flag(limit-build-mem)
316316
ghc-options: +RTS -M2000M -RTS
317317

0 commit comments

Comments
 (0)