on master help sign in
Remove doctests
624158dHarendra Kumar
.github/workflows/haskell.yml−9
@@ -59,7 +59,6 @@ jobs:
59 - 8.6.5+fusion-plugin
59 - 8.6.5+fusion-plugin
60 - 8.6.5+streamk
60 - 8.6.5+streamk
61 - 8.4.4+debug
61 - 8.4.4+debug
62− - doctests
63 cabal_version: ["3.4"]
62 cabal_version: ["3.4"]
64 include:
63 include:
65 - name: 9.0.1
64 - name: 9.0.1
@@ -116,14 +115,6 @@ jobs:
116 cabal_project: cabal.project
115 cabal_project: cabal.project
117 cabal_build_options: "--flag debug --flag -opt"
116 cabal_build_options: "--flag debug --flag -opt"
118 runner: ubuntu-latest
117 runner: ubuntu-latest
119− - name: doctests
120− ghc_version: 8.8.3
121− build: cabal-v2
122− cabal_build_options: "--flag doctests"
123− cabal_build_targets: doctests
124− disable_sdist_build: "y"
125− disable_dist_checks: "y"
126− runner: ubuntu-latest
127
118
128 steps:
119 steps:
129 - uses: actions/checkout@v2
120 - uses: actions/checkout@v2
.packcheck.ignore+1
@@ -2,6 +2,7 @@
2cabal.project
2cabal.project
3cabal.project.ci
3cabal.project.ci
4cabal.project.coverage
4cabal.project.coverage
5+cabal.project.doctest
5cabal.project.hpc-coveralls
6cabal.project.hpc-coveralls
6hie.yaml
7hie.yaml
7stack.yaml
8stack.yaml
Setup.hs+2−2
@@ -1,6 +1,6 @@
1module Main (main) where
1module Main (main) where
2
2
3−import Distribution.Extra.Doctest (defaultMainAutoconfWithDoctests)
3+import Distribution.Simple
4
4
5main :: IO ()
5main :: IO ()
6−main = defaultMainAutoconfWithDoctests "doctests"
6+main = defaultMainWithHooks autoconfUserHooks
cabal.project.doctestnew file+2
@@ -0,0 +1,2 @@
1+packages: streamly.cabal
2+ , docs/streamly-docs.cabal
docs/Setup.hs+2−2
@@ -1,6 +1,6 @@
1module Main (main) where
1module Main (main) where
2
2
3−import Distribution.Extra.Doctest (defaultMainWithDoctests)
3+import Distribution.Simple
4
4
5main :: IO ()
5main :: IO ()
6−main = defaultMainWithDoctests "streamly-docs-doctests"
6+main = defaultMain
docs/doctests.hsdeleted−28
@@ -1,28 +0,0 @@
1−module Main where
2−
3−import Build_doctests (flags, pkgs, module_sources)
4−import Data.Foldable (traverse_)
5−import System.Environment.Compat (getArgs, unsetEnv)
6−import Test.DocTest (doctest)
7−
8−import qualified Data.List as List
9−
10−main :: IO ()
11−main = do
12− cliArgs <- getArgs
13− let (cliArgs1, mods) =
14− if (List.null (filter (== "--modules") cliArgs))
15− then (cliArgs, module_sources)
16− else (List.delete "--modules" cliArgs, [])
17− let args =
18− [ "-outputdir=./_doctests/"
19− , "-fobject-code"
20− , "--fast"
21− ]
22− ++ cliArgs1
23− ++ flags
24− ++ pkgs
25− ++ mods
26− traverse_ putStrLn args
27− unsetEnv "GHC_ENVIRONMENT"
28− doctest args
docs/streamly-docs.cabal+1−19
@@ -9,12 +9,7 @@ name: streamly-docs
9version: 0.0.0
9version: 0.0.0
10synopsis: Documentation for Streamly
10synopsis: Documentation for Streamly
11description: Documentation for Streamly
11description: Documentation for Streamly
12−build-type: Custom
12+build-type: Simple
13−custom-setup
14− setup-depends:
15− base >= 4 && <5,
16− cabal-doctest >= 1 && <1.1,
17− Cabal >= 2.2 && < 4
18
13
19-------------------------------------------------------------------------------
14-------------------------------------------------------------------------------
20-- Library
15-- Library
@@ -33,16 +28,3 @@ library
33 base >= 4.9 && < 5
28 base >= 4.9 && < 5
34 , transformers >= 0.4 && < 0.6
29 , transformers >= 0.4 && < 0.6
35 , streamly
30 , streamly
36−
37−test-suite streamly-docs-doctests
38− type: exitcode-stdio-1.0
39− default-language: Haskell2010
40− ghc-options: -Wall
41− hs-source-dirs: .
42− main-is: doctests.hs
43− autogen-modules: Build_doctests
44− build-depends:
45− base
46− , base-compat >= 0.10.5 && < 0.12
47− , doctest >= 0.15 && < 0.19
48− , streamly-docs
doctests.hsdeleted−28
@@ -1,28 +0,0 @@
1−module Main where
2−
3−import Build_doctests (flags, pkgs, module_sources)
4−import Data.Foldable (traverse_)
5−import System.Environment.Compat (getArgs, unsetEnv)
6−import Test.DocTest (doctest)
7−
8−import qualified Data.List as List
9−
10−main :: IO ()
11−main = do
12− cliArgs <- getArgs
13− let (cliArgs1, mods) =
14− if (List.null (filter (== "--modules") cliArgs))
15− then (cliArgs, module_sources)
16− else (List.delete "--modules" cliArgs, [])
17− let args =
18− [ "-outputdir=./_doctests/"
19− , "-fobject-code"
20− , "--fast"
21− ]
22− ++ cliArgs1
23− ++ flags
24− ++ pkgs
25− ++ mods
26− traverse_ putStrLn args
27− unsetEnv "GHC_ENVIRONMENT"
28− doctest args
streamly.cabal+1−28
@@ -45,7 +45,7 @@ category:
45 Logic, Non-determinism, Parsing, Array, Time, Unicode, Filesystem,
45 Logic, Non-determinism, Parsing, Array, Time, Unicode, Filesystem,
46 Network
46 Network
47stability: Stable
47stability: Stable
48−build-type: Custom
48+build-type: Configure
49
49
50extra-source-files:
50extra-source-files:
51 .circleci/config.yml
51 .circleci/config.yml
@@ -190,17 +190,6 @@ flag opt
190 manual: True
190 manual: True
191 default: True
191 default: True
192
192
193−flag doctests
194− description: Build doctests test suite
195− manual: True
196− default: False
197−
198−custom-setup
199− setup-depends:
200− base >= 4 && <5,
201− cabal-doctest >= 1 && <1.1,
202− Cabal >= 2.2 && < 4
203−
204-------------------------------------------------------------------------------
193-------------------------------------------------------------------------------
205-- Common stanzas
194-- Common stanzas
206-------------------------------------------------------------------------------
195-------------------------------------------------------------------------------
@@ -540,19 +529,3 @@ library
540 -- tests fail
529 -- tests fail
541 if flag(dev) && flag(inspection)
530 if flag(dev) && flag(inspection)
542 build-depends: inspection-and-dev-flags-cannot-be-used-together
531 build-depends: inspection-and-dev-flags-cannot-be-used-together
543−
544−test-suite doctests
545− type: exitcode-stdio-1.0
546− main-is: doctests.hs
547− if flag(doctests)
548− build-depends:
549− base
550− , base-compat >= 0.10.5 && < 0.12
551− , doctest >= 0.15 && < 0.19
552− , streamly
553− else
554− buildable: False
555−
556− ghc-options: -Wall -threaded
557− hs-source-dirs: .
558− default-language: Haskell2010