diff options
Diffstat (limited to 'haddock-library')
-rw-r--r-- | haddock-library/haddock-library.cabal | 8 | ||||
-rw-r--r-- | haddock-library/src/Documentation/Haddock/Parser.hs | 3 | ||||
-rw-r--r-- | haddock-library/test/doctests.hs | 11 |
3 files changed, 22 insertions, 0 deletions
diff --git a/haddock-library/haddock-library.cabal b/haddock-library/haddock-library.cabal index 20e0e94e..8af94a4b 100644 --- a/haddock-library/haddock-library.cabal +++ b/haddock-library/haddock-library.cabal @@ -73,6 +73,14 @@ test-suite spec , deepseq , QuickCheck == 2.* +test-suite doctests + type: exitcode-stdio-1.0 + default-language: Haskell2010 + hs-source-dirs: test + main-is: doctests.hs + ghc-options: -threaded + build-depends: base, doctest >= 0.8 + source-repository head type: git subdir: haddock-library diff --git a/haddock-library/src/Documentation/Haddock/Parser.hs b/haddock-library/src/Documentation/Haddock/Parser.hs index b7178842..c84217b7 100644 --- a/haddock-library/src/Documentation/Haddock/Parser.hs +++ b/haddock-library/src/Documentation/Haddock/Parser.hs @@ -38,6 +38,9 @@ import Documentation.Haddock.Types import Documentation.Haddock.Utf8 import Prelude hiding (takeWhile) +-- $setup +-- >>> :set -XOverloadedStrings + -- | Identifier string surrounded with opening and closing quotes/backticks. type Identifier = (Char, String, Char) diff --git a/haddock-library/test/doctests.hs b/haddock-library/test/doctests.hs new file mode 100644 index 00000000..e4f93858 --- /dev/null +++ b/haddock-library/test/doctests.hs @@ -0,0 +1,11 @@ +module Main where + +import Test.DocTest + +main :: IO () +main = doctest [ + "-isrc" + , "-ivendor/attoparsec-0.10.4.0" + , "-optP-include", "-optPdist/build/autogen/cabal_macros.h" + , "src/Documentation/Haddock/Parser.hs" + ] |