@@ -134,7 +134,11 @@ showTextData = T.toLower . showt
134134-- >>> toUrlPiece Foo
135135-- "foo"
136136showTextData :: Show a => a -> Text
137−showTextData = T.toLower . T.pack . show
137+showTextData = T.toLower . showt
138+
139+-- | Like @'show'@, but returns @'Text'@.
140+showt :: Show a => a -> Text
141+showt = T.pack . show
138142#endif
139143
140144-- | Parse given text case insensitive and return the rest of the input.
@@ -250,7 +254,6 @@ instance ToHttpApiData Void where
250254instance ToHttpApiData Bool where toUrlPiece = showTextData
251255instance ToHttpApiData Ordering where toUrlPiece = showTextData
252256
253−#if USE_TEXT_SHOW
254257instance ToHttpApiData Double where toUrlPiece = showt
255258instance ToHttpApiData Float where toUrlPiece = showt
256259instance ToHttpApiData Int where toUrlPiece = showt
@@ -265,22 +268,6 @@ instance ToHttpApiData Word16 where toUrlPiece = showt
265268instance ToHttpApiData Word32 where toUrlPiece = showt
266269instance ToHttpApiData Word64 where toUrlPiece = showt
267270instance ToHttpApiData Day where toUrlPiece = T.pack . show
268−#else
269−instance ToHttpApiData Double where toUrlPiece = showTextData
270−instance ToHttpApiData Float where toUrlPiece = showTextData
271−instance ToHttpApiData Int where toUrlPiece = showTextData
272−instance ToHttpApiData Int8 where toUrlPiece = showTextData
273−instance ToHttpApiData Int16 where toUrlPiece = showTextData
274−instance ToHttpApiData Int32 where toUrlPiece = showTextData
275−instance ToHttpApiData Int64 where toUrlPiece = showTextData
276−instance ToHttpApiData Integer where toUrlPiece = showTextData
277−instance ToHttpApiData Word where toUrlPiece = showTextData
278−instance ToHttpApiData Word8 where toUrlPiece = showTextData
279−instance ToHttpApiData Word16 where toUrlPiece = showTextData
280−instance ToHttpApiData Word32 where toUrlPiece = showTextData
281−instance ToHttpApiData Word64 where toUrlPiece = showTextData
282−instance ToHttpApiData Day where toUrlPiece = showTextData
283−#endif
284271
285272instance ToHttpApiData String where toUrlPiece = T.pack
286273instance ToHttpApiData Text where toUrlPiece = id