git.iko.soy/typeable/http-api-data
on master help sign in
Merge pull request #97 from fizruk/updates-b

Updates b

commit432db612b076c23bb5a7af02e512d8020953710f authorOleg Grenrus <oleg.grenrus@iki.fi> dateMon 11 Nov 2019, 09:57 (7 years ago) parentccf757dbf4b88d
7 files changed+36−101
.travis.yml+29−17 Setup.hs+2 Setup.lhs−36 cabal.haskell-ci+1 cabal.project+1−1 http-api-data.cabal+3−22 test/doctests.hs−25
.travis.yml+29−17
@@ -4,7 +4,7 @@
44#
55# For more information, see https://github.com/haskell-CI/haskell-ci
66#
7−# version: 0.5.20190908
7+# version: 0.7.20191106
88#
99language: c
1010dist: xenial
@@ -18,6 +18,7 @@ cache:
1818 directories:
1919 - $HOME/.cabal/packages
2020 - $HOME/.cabal/store
21+ - $HOME/.hlint
2122before_cache:
2223 - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
2324 # remove files that are regenerated by 'cabal update'
@@ -83,27 +84,36 @@ install:
8384 - HEADHACKAGE=false
8485 - rm -f $CABALHOME/config
8586 - |
86− echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
87− echo "remote-build-reporting: anonymous" >> $CABALHOME/config
88− echo "write-ghc-environment-files: always" >> $CABALHOME/config
89− echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
90− echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
91− echo "world-file: $CABALHOME/world" >> $CABALHOME/config
92− echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
93− echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
94− echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
95− echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
96− echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
97− echo "install-dirs user" >> $CABALHOME/config
98− echo " prefix: $CABALHOME" >> $CABALHOME/config
99− echo "repository hackage.haskell.org" >> $CABALHOME/config
100− echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
87+ echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
88+ echo "remote-build-reporting: anonymous" >> $CABALHOME/config
89+ echo "write-ghc-environment-files: always" >> $CABALHOME/config
90+ echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
91+ echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
92+ echo "world-file: $CABALHOME/world" >> $CABALHOME/config
93+ echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
94+ echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
95+ echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
96+ echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
97+ echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
98+ echo "install-dirs user" >> $CABALHOME/config
99+ echo " prefix: $CABALHOME" >> $CABALHOME/config
100+ echo "repository 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
101110 - |
102111 echo "program-default-options" >> $CABALHOME/config
103112 echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
104113 - cat $CABALHOME/config
105114 - rm -fv cabal.project cabal.project.local cabal.project.freeze
106115 - 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
107117 # Generate cabal.project
108118 - rm -rf cabal.project cabal.project.local cabal.project.freeze
109119 - touch cabal.project
@@ -146,6 +156,8 @@ script:
146156 - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
147157 # Testing...
148158 - ${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
149161 # cabal check...
150162 - (cd ${PKGDIR_http_api_data} && ${CABAL} -vnormal check)
151163 # haddock...
@@ -158,5 +170,5 @@ script:
158170 # Constraint set text-show
159171 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='http-api-data +use-text-show' all | color_cabal_output
160172
161−# REGENDATA ["--config=cabal.haskell-ci","http-api-data.cabal"]
173+# REGENDATA ("0.7.20191106",["--config=cabal.haskell-ci","http-api-data.cabal"])
162174# 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 @@
11branches: master
2+doctest: True
23
34constraint-set text-show
45 constraints: http-api-data +use-text-show
cabal.project+1−1
@@ -1,2 +1,2 @@
11packages: .
2−tests: true
2+tests: True
http-api-data.cabal+3−22
@@ -1,7 +1,6 @@
11cabal-version: >= 1.10
22name: http-api-data
3−version: 0.4.1
4−x-revision: 2
3+version: 0.4.1.1
54
65synopsis: Converting to/from HTTP API data like URL pieces, headers and query parameters.
76category: Web
@@ -16,7 +15,7 @@ author: Nickolay Kudasov <nickolay.kudasov@gmail.com>
1615maintainer: Nickolay Kudasov <nickolay.kudasov@gmail.com>
1716homepage: http://github.com/fizruk/http-api-data
1817stability: unstable
19−build-type: Custom
18+build-type: Simple
2019
2120extra-source-files:
2221 include/overlapping-compat.h
@@ -33,12 +32,6 @@ tested-with:
3332 GHC==8.6.5,
3433 GHC==8.8.1
3534
36−custom-setup
37− setup-depends:
38− base,
39− Cabal,
40− cabal-doctest >=1.0.6 && <1.1
41−
4235flag use-text-show
4336 description: Use text-show library for efficient ToHttpApiData implementations.
4437 default: False
@@ -63,7 +56,7 @@ library
6356 attoparsec >= 0.13.2.2 && < 0.14
6457 , attoparsec-iso8601 >= 1.0.1.0 && < 1.1
6558 , base-compat >= 0.10.5 && < 0.12
66− , cookie >= 0.4.3 && < 0.4.5
59+ , cookie >= 0.4.3 && < 0.5
6760 , hashable >= 1.2.7.0 && < 1.4
6861 , http-types >= 0.12.3 && < 0.13
6962 , tagged >= 0.8.5 && < 0.9
@@ -120,18 +113,6 @@ test-suite spec
120113 , QuickCheck >= 2.13.1 && <2.14
121114 , quickcheck-instances >= 0.3.21 && <0.4
122115
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−
135116source-repository head
136117 type: git
137118 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