@@ -91,7 +91,7 @@ maintainer: streamly@composewell.com
9191copyright: 2017 Composewell Technologies
9292category: Control, Concurrency, Streaming, Reactivity
9393stability: Experimental
94−build-type: Configure
94+build-type: Custom
9595
9696extra-source-files:
9797 .circleci/config.yml
@@ -238,6 +238,16 @@ flag opt
238238 manual: True
239239 default: True
240240
241+flag doctests
242+ description: Build doctests test suite
243+ manual: True
244+ default: False
245+
246+custom-setup
247+ setup-depends:
248+ base >= 4 && <5,
249+ cabal-doctest >= 1 && <1.1
250+
241251-------------------------------------------------------------------------------
242252-- Common stanzas
243253-------------------------------------------------------------------------------
@@ -570,3 +580,19 @@ library
570580 -- tests fail
571581 if flag(dev) && flag(inspection)
572582 build-depends: inspection-and-dev-flags-cannot-be-used-together
583+
584+test-suite doctests
585+ type: exitcode-stdio-1.0
586+ main-is: doctests.hs
587+ if flag(doctests)
588+ build-depends:
589+ base
590+ , base-compat >=0.10.5 && <0.12
591+ , doctest >=0.15 && <0.18
592+ , streamly
593+ else
594+ buildable: False
595+
596+ ghc-options: -Wall -threaded
597+ hs-source-dirs: .
598+ default-language: Haskell2010