git.iko.soy/typeable/http-api-data
on master help sign in
Merge pull request #69 from phadej/smp

Smp

commit83aac9540f4a304927c601c5db12f4dc2bf93816 authorOleg Grenrus <oleg.grenrus@iki.fi> dateTue 6 Feb 2018, 11:29 (9 years ago) parentb61b152461de43
4 files changed+52−7
.travis.yml+25−2 cabal.make-travis-yml+20−2 http-api-data.cabal+5−2 src/Web/Internal/FormUrlEncoded.hs+2−1
.travis.yml+25−2
@@ -44,6 +44,12 @@ matrix:
4444 - compiler: "ghc-8.2.2"
4545 # env: TEST=--disable-tests BENCH=--disable-benchmarks
4646 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.2], sources: [hvr-ghc]}}
47+ - compiler: "ghc-8.4.1"
48+ env: GHCHEAD=true
49+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.4.1], sources: [hvr-ghc]}}
50+
51+ allow_failures:
52+ - compiler: "ghc-8.4.1"
4753
4854before_install:
4955 - HC=${CC}
@@ -67,6 +73,21 @@ install:
6773 - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
6874 - rm -fv cabal.project cabal.project.local
6975 - "if [ $HCNUMVER -ge 70800 ]; then sed -i.bak 's/-- ghc-options:.*/ghc-options: -j2/' ${HOME}/.cabal/config; fi"
76+ # Overlay Hackage Package Index for GHC HEAD: https://github.com/hvr/head.hackage
77+ - |
78+ if $GHCHEAD; then
79+ sed -i.bak 's/-- allow-newer:.*/allow-newer: *:base, *:template-haskell, *:ghc, *:Cabal/' ${HOME}/.cabal/config
80+
81+ echo 'repository head.hackage' >> ${HOME}/.cabal/config
82+ echo ' url: http://head.hackage.haskell.org/' >> ${HOME}/.cabal/config
83+ echo ' secure: True' >> ${HOME}/.cabal/config
84+ echo ' root-keys: 07c59cb65787dedfaef5bd5f987ceb5f7e5ebf88b904bbd4c5cbdeb2ff71b740' >> ${HOME}/.cabal/config
85+ echo ' 2e8555dde16ebd8df076f1a8ef13b8f14c66bad8eafefd7d9e37d0ed711821fb' >> ${HOME}/.cabal/config
86+ echo ' 8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >> ${HOME}/.cabal/config
87+ echo ' key-threshold: 3' >> ${HOME}/.cabal.config
88+
89+ cabal new-update head.hackage -v
90+ fi
7091 - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
7192 - "printf 'packages: \".\"\\n' > cabal.project"
7293 - cat cabal.project
@@ -106,9 +127,11 @@ script:
106127 - rm -rf ./dist-newstyle
107128 - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
108129
109− - if [ $HCNUMVER -eq 70804 ]; then cabal new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='attoparsec ==0.13.0.1' --constraint='attoparsec-iso8601 ==1.0.0.0' --constraint='bytestring ==0.10.4.0' --constraint='containers ==0.5.5.1' --constraint='hashable ==1.1.2.4' --constraint='http-types ==0.8.6' --constraint='text ==1.1.1.3' --constraint='time ==1.4.2' --constraint='time-local-compat ==0.1.1.0' --constraint='unordered-containers ==0.2.5.0' --constraint='uri-bytestring ==0.1.7' --constraint='uuid-types ==1.0.2' all; else echo skipping...; fi
130+ - if [ $HCNUMVER -eq 70804 ]; then cabal new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='attoparsec ==0.13.0.1' --constraint='attoparsec-iso8601 ==1.0.0.0' --constraint='bytestring ==0.10.4.0' --constraint='containers ==0.5.5.1' --constraint='hashable ==1.1.2.4' --constraint='http-types ==0.8.6' --constraint='semigroups ==0.16' --constraint='text ==1.1.1.3' --constraint='time ==1.4.2' --constraint='time-local-compat ==0.1.1.0' --constraint='unordered-containers ==0.2.6.0' --constraint='uri-bytestring ==0.1.7' --constraint='uuid-types ==1.0.2' all; else echo skipping...; fi
131+
132+ - if [ $HCNUMVER -eq 71003 ]; then cabal new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='attoparsec ==0.13.0.1' --constraint='attoparsec-iso8601 ==1.0.0.0' --constraint='bytestring ==0.10.6.0' --constraint='containers ==0.5.6.1' --constraint='hashable ==1.2.3.2' --constraint='http-types ==0.8.6' --constraint='semigroups ==0.16.0.1' --constraint='text ==1.2.0.2' --constraint='time ==1.5.0.1' --constraint='time-local-compat ==0.1.1.0' --constraint='unordered-containers ==0.2.6.0' --constraint='uri-bytestring ==0.1.7' --constraint='uuid-types ==1.0.2' all; else echo skipping...; fi
110133
111− - if [ $HCNUMVER -eq 71003 ]; then cabal new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='attoparsec ==0.13.0.1' --constraint='attoparsec-iso8601 ==1.0.0.0' --constraint='bytestring ==0.10.6.0' --constraint='containers ==0.5.6.1' --constraint='hashable ==1.2.3.2' --constraint='http-types ==0.8.6' --constraint='text ==1.2.0.2' --constraint='time ==1.5.0.1' --constraint='time-local-compat ==0.1.1.0' --constraint='unordered-containers ==0.2.5.1' --constraint='uri-bytestring ==0.1.7' --constraint='uuid-types ==1.0.2' all; else echo skipping...; fi
134+ - if [ $HCNUMVER -eq 80002 ]; then cabal new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='attoparsec ==0.13.0.1' --constraint='attoparsec-iso8601 ==1.0.0.0' --constraint='bytestring ==0.10.6.0' --constraint='containers ==0.5.7.0' --constraint='hashable ==1.2.4.0' --constraint='http-types ==0.8.6' --constraint='text ==1.2.2.0' --constraint='time ==1.5.0.1' --constraint='time-local-compat ==0.1.1.0' --constraint='unordered-containers ==0.2.6.0' --constraint='uri-bytestring ==0.2.1.0' --constraint='uuid-types ==1.0.2' all; else echo skipping...; fi
112135
113136# REGENDATA ["--config","--output",".travis.yml","http-api-data.cabal"]
114137# EOF
cabal.make-travis-yml+20−2
@@ -14,10 +14,11 @@ constraint-set lower-bounds-7.8.4
1414 containers ==0.5.5.1,
1515 hashable ==1.1.2.4,
1616 http-types ==0.8.6,
17+ semigroups ==0.16,
1718 text ==1.1.1.3,
1819 time ==1.4.2,
1920 time-local-compat ==0.1.1.0,
20− unordered-containers ==0.2.5.0,
21+ unordered-containers ==0.2.6.0,
2122 uri-bytestring ==0.1.7,
2223 uuid-types ==1.0.2
2324
@@ -30,9 +31,26 @@ constraint-set lower-bounds-7.10.3
3031 containers ==0.5.6.1,
3132 hashable ==1.2.3.2,
3233 http-types ==0.8.6,
34+ semigroups ==0.16.0.1,
3335 text ==1.2.0.2,
3436 time ==1.5.0.1,
3537 time-local-compat ==0.1.1.0,
36− unordered-containers ==0.2.5.1,
38+ unordered-containers ==0.2.6.0,
3739 uri-bytestring ==0.1.7,
3840 uuid-types ==1.0.2
41+
42+constraint-set lower-bounds-8.0.2
43+ ghc: == 8.0.2
44+ constraints:
45+ attoparsec ==0.13.0.1,
46+ attoparsec-iso8601 ==1.0.0.0,
47+ bytestring ==0.10.6.0,
48+ containers ==0.5.7.0,
49+ hashable ==1.2.4.0,
50+ http-types ==0.8.6,
51+ text ==1.2.2.0,
52+ time ==1.5.0.1,
53+ time-local-compat ==0.1.1.0,
54+ unordered-containers ==0.2.6.0,
55+ uri-bytestring ==0.2.1.0,
56+ uuid-types ==1.0.2
http-api-data.cabal+5−2
@@ -23,7 +23,8 @@ tested-with:
2323 GHC==7.8.4,
2424 GHC==7.10.3,
2525 GHC==8.0.2,
26− GHC==8.2.2
26+ GHC==8.2.2,
27+ GHC==8.4.1
2728
2829custom-setup
2930 setup-depends:
@@ -49,9 +50,11 @@ library
4950 , text >= 1.1.1.3 && < 1.3
5051 , time >= 1.4.2 && < 1.9
5152 , time-locale-compat >= 0.1.1.0 && < 0.2
52− , unordered-containers >= 0.2.5.0 && < 0.3
53+ , unordered-containers >= 0.2.6.0 && < 0.3
5354 , uri-bytestring >= 0.1.7 && < 0.4
5455 , uuid-types >= 1.0.2 && <1.1
56+ if !impl(ghc >= 8.0)
57+ build-depends: semigroups >= 0.16 && < 0.19
5558 if flag(use-text-show)
5659 cpp-options: -DUSE_TEXT_SHOW
5760 build-depends: text-show >= 2
src/Web/Internal/FormUrlEncoded.hs+2−1
@@ -39,6 +39,7 @@ import Data.List (intersperse, sortBy)
3939import Data.Map (Map)
4040import qualified Data.Map as Map
4141import Data.Monoid
42+import qualified Data.Semigroup as Semi
4243import Data.Ord (comparing)
4344
4445import Data.Text (Text)
@@ -183,7 +184,7 @@ instance FromFormKey Natural where parseFormKey = parseQueryParam
183184--
184185-- 'Form' can be URL-encoded with 'urlEncodeForm' and URL-decoded with 'urlDecodeForm'.
185186newtype Form = Form { unForm :: HashMap Text [Text] }
186− deriving (Eq, Read, Generic, Monoid)
187+ deriving (Eq, Read, Generic, Semi.Semigroup, Monoid)
187188
188189instance Show Form where
189190 showsPrec d form = showParen (d > 10) $