Permalink
Browse files

Update documentation and examples

  • Loading branch information...
1 parent 73afc35 commit 7eb230792114660d1156bb72a71f25b12586bc95 @sol committed Jun 22, 2012
Showing with 10 additions and 13 deletions.
  1. +3 −3 README.markdown
  2. +1 −4 bash_completion.d/doctest-haskell
  3. +1 −1 example/test/doctests.hs
  4. +5 −5 test/doctests.hs
View
6 README.markdown
@@ -70,9 +70,9 @@ You may produce Haddock documentation for that module with:
The easiest way to tell Doctest about GHC extensions is to use [LANGUAGE
pragmas] [language-pragma] in your source files.
-Alternatively you can pass any GHC options to Doctest with `--optghc`.
+Alternatively you can pass any GHC options to Doctest, e.g.:
- doctest --options=-cpp Foo.hs
+ doctest -cpp Foo.hs
### Cabal integration
@@ -96,7 +96,7 @@ passing all command-line arguments that are required for that project to
```haskell
-- file doctests.hs
import Test.DocTest
-main = doctest ["--optghc=isrc", "src/Main.hs"]
+main = doctest ["-isrc", "src/Main.hs"]
```
And a corresponding Cabal test suite section like this:
View
5 bash_completion.d/doctest-haskell
@@ -9,12 +9,9 @@ _doctest()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
- opts='--help --version -v --verbose --optghc'
+ opts='--help --version'
case "${prev}" in
- --optghc)
- return 0
- ;;
*)
;;
esac
View
2 example/test/doctests.hs
@@ -3,4 +3,4 @@ module Main where
import Test.DocTest
main :: IO ()
-main = doctest ["--optghc=-isrc", "src/Example.hs"]
+main = doctest ["-isrc", "src/Example.hs"]
View
10 test/doctests.hs
@@ -4,10 +4,10 @@ import Test.DocTest
main :: IO ()
main = doctest [
- "--optghc=-packageghc"
- , "--optghc=-isrc"
- , "--optghc=-idist/build/autogen/"
- , "--optghc=-optP-include"
- , "--optghc=-optPdist/build/autogen/cabal_macros.h"
+ "-packageghc"
+ , "-isrc"
+ , "-idist/build/autogen/"
+ , "-optP-include"
+ , "-optPdist/build/autogen/cabal_macros.h"
, "src/Run.hs"
]

0 comments on commit 7eb2307

Please sign in to comment.