File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff 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)"
Original file line number Diff line number Diff 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"]
9291toUrlPieces :: (Functor t , ToHttpApiData a ) => t a -> t Text
9392toUrlPieces = 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"]
108107toQueryParams :: (Functor t , ToHttpApiData a ) => t a -> t Text
109108toQueryParams = fmap toQueryParam
Original file line number Diff line number Diff line change 99
1010extra-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
You can’t perform that action at this time.
0 commit comments