Skip to content

Commit e9c728b

Browse files
committed
Fix GHC 7.8 builds
1 parent 5a448b3 commit e9c728b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/Web/HttpApiData.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import Web.Internal.HttpApiData
4444

4545
-- $setup
4646
--
47-
-- >>> :unset -XOverloadedLists
4847
-- >>> :set -XOverloadedStrings
4948
-- >>> import Control.Applicative
5049
-- >>> import Data.Time
@@ -70,7 +69,7 @@ import Web.Internal.HttpApiData
7069
-- "45.2"
7170
-- >>> parseQueryParam "452" :: Either Text Int
7271
-- Right 452
73-
-- >>> toQueryParams [1..5]
72+
-- >>> toQueryParams [1..5] :: [Text]
7473
-- ["1","2","3","4","5"]
7574
-- >>> parseQueryParams ["127", "255"] :: Either Text [Int8]
7675
-- Left "out of bounds: `255' (should be between -128 and 127)"

src/Web/Internal/HttpApiData.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ import TextShow (TextShow, showt)
4545
#endif
4646

4747
-- $setup
48-
-- >>> :unset -XOverloadedLists
4948
-- >>> data BasicAuthToken = BasicAuthToken Text deriving (Show)
5049
-- >>> instance FromHttpApiData BasicAuthToken where parseHeader h = BasicAuthToken <$> parseHeaderWithPrefix "Basic " h; parseQueryParam p = BasicAuthToken <$> parseQueryParam p
5150

@@ -87,7 +86,7 @@ class FromHttpApiData a where
8786

8887
-- | Convert multiple values to a list of URL pieces.
8988
--
90-
-- >>> toUrlPieces [1, 2, 3]
89+
-- >>> toUrlPieces [1, 2, 3] :: [Text]
9190
-- ["1","2","3"]
9291
toUrlPieces :: (Functor t, ToHttpApiData a) => t a -> t Text
9392
toUrlPieces = fmap toUrlPiece
@@ -103,7 +102,7 @@ parseUrlPieces = traverse parseUrlPiece
103102

104103
-- | Convert multiple values to a list of query parameter values.
105104
--
106-
-- >>> toQueryParams [fromGregorian 2015 10 03, fromGregorian 2015 12 01]
105+
-- >>> toQueryParams [fromGregorian 2015 10 03, fromGregorian 2015 12 01] :: [Text]
107106
-- ["2015-10-03","2015-12-01"]
108107
toQueryParams :: (Functor t, ToHttpApiData a) => t a -> t Text
109108
toQueryParams = fmap toQueryParam

stack-ghc-7.8.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ flags:
99

1010
extra-deps:
1111
- time-locale-compat-0.1.1.3
12+
- uri-bytestring-0.2.2.0
1213
# below are dependencies necessary for use-text-show=true
1314
- text-show-2.1.2
1415
- base-compat-0.9.1

0 commit comments

Comments
 (0)