git.iko.soy/typeable/http-api-data
on master help sign in
Merge pull request #97 from fizruk/updates-b
432db61Oleg Grenrus
.travis.yml+29−17
@@ -4,7 +4,7 @@
4#
4#
5# For more information, see https://github.com/haskell-CI/haskell-ci
5# For more information, see https://github.com/haskell-CI/haskell-ci
6#
6#
7−# version: 0.5.20190908
7+# version: 0.7.20191106
8#
8#
9language: c
9language: c
10dist: xenial
10dist: xenial
@@ -18,6 +18,7 @@ cache:
18 directories:
18 directories:
19 - $HOME/.cabal/packages
19 - $HOME/.cabal/packages
20 - $HOME/.cabal/store
20 - $HOME/.cabal/store
21+ - $HOME/.hlint
21before_cache:
22before_cache:
22 - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
23 - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
23 # remove files that are regenerated by 'cabal update'
24 # remove files that are regenerated by 'cabal update'
@@ -83,27 +84,36 @@ install:
83 - HEADHACKAGE=false
84 - HEADHACKAGE=false
84 - rm -f $CABALHOME/config
85 - rm -f $CABALHOME/config
85 - |
86 - |
86− echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
87+ echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
87− echo "remote-build-reporting: anonymous" >> $CABALHOME/config
88+ echo "remote-build-reporting: anonymous" >> $CABALHOME/config
88− echo "write-ghc-environment-files: always" >> $CABALHOME/config
89+ echo "write-ghc-environment-files: always" >> $CABALHOME/config
89− echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
90+ echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
90− echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
91+ echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
91− echo "world-file: $CABALHOME/world" >> $CABALHOME/config
92+ echo "world-file: $CABALHOME/world" >> $CABALHOME/config
92− echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
93+ echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
93− echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
94+ echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
94− echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
95+ echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
95− echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
96+ echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
96− echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
97+ echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
97− echo "install-dirs user" >> $CABALHOME/config
98+ echo "install-dirs user" >> $CABALHOME/config
98− echo " prefix: $CABALHOME" >> $CABALHOME/config
99+ echo " prefix: $CABALHOME" >> $CABALHOME/config
99− echo "repository hackage.haskell.org" >> $CABALHOME/config
100+ echo "repository hackage.haskell.org" >> $CABALHOME/config
100− echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
101+ echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
102+ echo " secure: True" >> $CABALHOME/config
103+ echo " key-threshold: 3" >> $CABALHOME/config
104+ echo " root-keys:" >> $CABALHOME/config
105+ echo " fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0" >> $CABALHOME/config
106+ echo " 1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42" >> $CABALHOME/config
107+ echo " 2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3" >> $CABALHOME/config
108+ echo " 0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d" >> $CABALHOME/config
109+ echo " 51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921" >> $CABALHOME/config
101 - |
110 - |
102 echo "program-default-options" >> $CABALHOME/config
111 echo "program-default-options" >> $CABALHOME/config
103 echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
112 echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
104 - cat $CABALHOME/config
113 - cat $CABALHOME/config
105 - rm -fv cabal.project cabal.project.local cabal.project.freeze
114 - rm -fv cabal.project cabal.project.local cabal.project.freeze
106 - travis_retry ${CABAL} v2-update -v
115 - travis_retry ${CABAL} v2-update -v
116+ - if [ $HCNUMVER -ge 80000 ] ; then (cd /tmp && ${CABAL} v2-install $WITHCOMPILER -j2 doctest --constraint='doctest ==0.16.*' | color_cabal_output) ; fi
107 # Generate cabal.project
117 # Generate cabal.project
108 - rm -rf cabal.project cabal.project.local cabal.project.freeze
118 - rm -rf cabal.project cabal.project.local cabal.project.freeze
109 - touch cabal.project
119 - touch cabal.project
@@ -146,6 +156,8 @@ script:
146 - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
156 - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
147 # Testing...
157 # Testing...
148 - ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
158 - ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
159+ # Doctest...
160+ - if [ $HCNUMVER -ge 80000 ] ; then (cd ${PKGDIR_http_api_data} && doctest src/) ; fi
149 # cabal check...
161 # cabal check...
150 - (cd ${PKGDIR_http_api_data} && ${CABAL} -vnormal check)
162 - (cd ${PKGDIR_http_api_data} && ${CABAL} -vnormal check)
151 # haddock...
163 # haddock...
@@ -158,5 +170,5 @@ script:
158 # Constraint set text-show
170 # Constraint set text-show
159 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='http-api-data +use-text-show' all | color_cabal_output
171 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='http-api-data +use-text-show' all | color_cabal_output
160
172
161−# REGENDATA ["--config=cabal.haskell-ci","http-api-data.cabal"]
173+# REGENDATA ("0.7.20191106",["--config=cabal.haskell-ci","http-api-data.cabal"])
162# EOF
174# EOF
Setup.hsnew file+2
@@ -0,0 +1,2 @@
1+import Distribution.Simple
2+main = defaultMain
Setup.lhsdeleted−36
@@ -1,36 +0,0 @@
1−\begin{code}
2−{-# LANGUAGE CPP #-}
3−{-# OPTIONS_GHC -Wall #-}
4−module Main (main) where
5−
6−#ifndef MIN_VERSION_cabal_doctest
7−#define MIN_VERSION_cabal_doctest(x,y,z) 0
8−#endif
9−
10−#if MIN_VERSION_cabal_doctest(1,0,0)
11−
12−import Distribution.Extra.Doctest ( defaultMainWithDoctests )
13−main :: IO ()
14−main = defaultMainWithDoctests "doctests"
15−
16−#else
17−
18−#ifdef MIN_VERSION_Cabal
19−-- If the macro is defined, we have new cabal-install,
20−-- but for some reason we don't have cabal-doctest in package-db
21−--
22−-- Probably we are running cabal sdist, when otherwise using new-build
23−-- workflow
24−#warning You are configuring this package without cabal-doctest installed. \
25− The doctests test-suite will not work as a result. \
26− To fix this, install cabal-doctest before configuring.
27−#endif
28−
29−import Distribution.Simple
30−
31−main :: IO ()
32−main = defaultMain
33−
34−#endif
35−
36−\end{code}
cabal.haskell-ci+1
@@ -1,4 +1,5 @@
1branches: master
1branches: master
2+doctest: True
2
3
3constraint-set text-show
4constraint-set text-show
4 constraints: http-api-data +use-text-show
5 constraints: http-api-data +use-text-show
cabal.project+1−1
@@ -1,2 +1,2 @@
1packages: .
1packages: .
2−tests: true
2+tests: True
http-api-data.cabal+3−22
@@ -1,7 +1,6 @@
1cabal-version: >= 1.10
1cabal-version: >= 1.10
2name: http-api-data
2name: http-api-data
3−version: 0.4.1
3+version: 0.4.1.1
4−x-revision: 2
5
4
6synopsis: Converting to/from HTTP API data like URL pieces, headers and query parameters.
5synopsis: Converting to/from HTTP API data like URL pieces, headers and query parameters.
7category: Web
6category: Web
@@ -16,7 +15,7 @@ author: Nickolay Kudasov <nickolay.kudasov@gmail.com>
16maintainer: Nickolay Kudasov <nickolay.kudasov@gmail.com>
15maintainer: Nickolay Kudasov <nickolay.kudasov@gmail.com>
17homepage: http://github.com/fizruk/http-api-data
16homepage: http://github.com/fizruk/http-api-data
18stability: unstable
17stability: unstable
19−build-type: Custom
18+build-type: Simple
20
19
21extra-source-files:
20extra-source-files:
22 include/overlapping-compat.h
21 include/overlapping-compat.h
@@ -33,12 +32,6 @@ tested-with:
33 GHC==8.6.5,
32 GHC==8.6.5,
34 GHC==8.8.1
33 GHC==8.8.1
35
34
36−custom-setup
37− setup-depends:
38− base,
39− Cabal,
40− cabal-doctest >=1.0.6 && <1.1
41−
42flag use-text-show
35flag use-text-show
43 description: Use text-show library for efficient ToHttpApiData implementations.
36 description: Use text-show library for efficient ToHttpApiData implementations.
44 default: False
37 default: False
@@ -63,7 +56,7 @@ library
63 attoparsec >= 0.13.2.2 && < 0.14
56 attoparsec >= 0.13.2.2 && < 0.14
64 , attoparsec-iso8601 >= 1.0.1.0 && < 1.1
57 , attoparsec-iso8601 >= 1.0.1.0 && < 1.1
65 , base-compat >= 0.10.5 && < 0.12
58 , base-compat >= 0.10.5 && < 0.12
66− , cookie >= 0.4.3 && < 0.4.5
59+ , cookie >= 0.4.3 && < 0.5
67 , hashable >= 1.2.7.0 && < 1.4
60 , hashable >= 1.2.7.0 && < 1.4
68 , http-types >= 0.12.3 && < 0.13
61 , http-types >= 0.12.3 && < 0.13
69 , tagged >= 0.8.5 && < 0.9
62 , tagged >= 0.8.5 && < 0.9
@@ -120,18 +113,6 @@ test-suite spec
120 , QuickCheck >= 2.13.1 && <2.14
113 , QuickCheck >= 2.13.1 && <2.14
121 , quickcheck-instances >= 0.3.21 && <0.4
114 , quickcheck-instances >= 0.3.21 && <0.4
122
115
123−test-suite doctests
124− ghc-options: -Wall
125− build-depends:
126− base,
127− directory >= 1.0,
128− doctest >= 0.16.0 && <0.17,
129− filepath
130− default-language: Haskell2010
131− hs-source-dirs: test
132− main-is: doctests.hs
133− type: exitcode-stdio-1.0
134−
135source-repository head
116source-repository head
136 type: git
117 type: git
137 location: https://github.com/fizruk/http-api-data
118 location: https://github.com/fizruk/http-api-data
test/doctests.hsdeleted−25
@@ -1,25 +0,0 @@
1−-----------------------------------------------------------------------------
2−-- |
3−-- Module : Main (doctests)
4−-- Copyright : (C) 2012-14 Edward Kmett
5−-- License : BSD-style (see the file LICENSE)
6−-- Maintainer : Edward Kmett <ekmett@gmail.com>
7−-- Stability : provisional
8−-- Portability : portable
9−--
10−-- This module provides doctests for a project based on the actual versions
11−-- of the packages it was built with. It requires a corresponding Setup.lhs
12−-- to be added to the project
13−-----------------------------------------------------------------------------
14−module Main where
15−
16−import Build_doctests (flags, pkgs, module_sources)
17−import Data.Foldable (traverse_)
18−import Test.DocTest
19−
20−main :: IO ()
21−main = do
22− traverse_ putStrLn args
23− doctest args
24− where
25− args = flags ++ pkgs ++ module_sources