git.iko.soy/typeable/validationt
on master help sign in
Merge pull request #9 from ilyakooo0/added-doctests

Added doctests and compiler warnings

commit4c4464e2e7e9ba2c8c8c37bbfef7b9d4a17082e0 authorDenis Redozubov <denis.redozubov@gmail.com> dateMon 27 Jan 2020, 17:10 (7 years ago) parentf0afa489b48aab
4 files changed+39−4
.travis.yml+1−2 stack.yaml+2−2 test/Doc.hs+6 validationt.cabal+30
.travis.yml+1−2
@@ -42,8 +42,7 @@ install:
4242script:
4343 - |
4444 if [ -z "$STACK_YAML" ]; then
45− echo 0
46− # cabal new-test --enable-tests
45+ cabal new-test --enable-tests
4746 else
4847 stack test --system-ghc
4948 fi
stack.yaml+2−2
@@ -15,7 +15,7 @@
1515# resolver:
1616# name: custom-snapshot
1717# location: "./custom-snapshot.yaml"
18−resolver: lts-8.14
18+resolver: lts-14.21
1919
2020# User packages to be built.
2121# Various formats can be used as shown in the example below.
@@ -63,4 +63,4 @@ extra-package-dbs: []
6363# extra-lib-dirs: [/path/to/dir]
6464#
6565# Allow a newer minor version of GHC than the snapshot specifies
66−# compiler-check: newer-minor
66+# compiler-check: newer-minor
test/Doc.hsnew file+6
@@ -0,0 +1,6 @@
1+module Main (main) where
2+
3+import Test.DocTest
4+
5+main :: IO ()
6+main = doctest [ "-XOverloadedStrings", "src" ]
validationt.cabal+30
@@ -38,3 +38,33 @@ library
3838 , vector
3939 hs-source-dirs: src
4040 default-language: Haskell2010
41+ ghc-options: -fwarn-unused-binds
42+ -Wall
43+ -Wincomplete-uni-patterns
44+ -Wincomplete-record-updates
45+ -Wpartial-fields
46+ -Werror=missing-home-modules
47+ -Wmissing-home-modules
48+ -Widentities
49+ -Wredundant-constraints
50+ -Wmissing-export-lists
51+
52+test-suite doctest
53+ type: exitcode-stdio-1.0
54+ hs-source-dirs: test
55+ ghc-options: -Wall
56+ main-is: Doc.hs
57+ build-depends: base >=4.8 && < 5
58+ , aeson >= 1.0
59+ , doctest
60+ , containers
61+ , exceptions
62+ , lens
63+ , monad-control
64+ , mtl
65+ , QuickCheck
66+ , text
67+ , transformers
68+ , transformers-base
69+ , vector
70+ , doctest