on master help sign in
Remove all use of bytestring-conversion
5bef76eAlex Mason
servant-docs/servant-docs.cabal−2
@@ -36,7 +36,6 @@ library
36 , aeson
36 , aeson
37 , aeson-pretty
37 , aeson-pretty
38 , bytestring
38 , bytestring
39− , bytestring-conversion
40 , case-insensitive
39 , case-insensitive
41 , hashable
40 , hashable
42 , http-media >= 0.6
41 , http-media >= 0.6
@@ -61,7 +60,6 @@ executable greet-docs
61 build-depends:
60 build-depends:
62 base
61 base
63 , aeson
62 , aeson
64− , bytestring-conversion
65 , lens
63 , lens
66 , servant
64 , servant
67 , servant-docs
65 , servant-docs
servant-docs/src/Servant/Docs/Internal.hs+2−3
@@ -25,7 +25,6 @@ import Control.Arrow (second)
25import Control.Lens (makeLenses, mapped, over, traversed, view, (%~),
25import Control.Lens (makeLenses, mapped, over, traversed, view, (%~),
26 (&), (.~), (<>~), (^.), (|>))
26 (&), (.~), (<>~), (^.), (|>))
27import qualified Control.Monad.Omega as Omega
27import qualified Control.Monad.Omega as Omega
28−import Data.ByteString.Conversion (ToByteString, toByteString)
29import Data.ByteString.Lazy.Char8 (ByteString)
28import Data.ByteString.Lazy.Char8 (ByteString)
30import qualified Data.ByteString.Char8 as BSC
29import qualified Data.ByteString.Char8 as BSC
31import qualified Data.CaseInsensitive as CI
30import qualified Data.CaseInsensitive as CI
@@ -461,12 +460,12 @@ class AllHeaderSamples ls where
461instance AllHeaderSamples '[] where
460instance AllHeaderSamples '[] where
462 allHeaderToSample _ = []
461 allHeaderToSample _ = []
463
462
464−instance (ToByteString l, AllHeaderSamples ls, ToSample l, KnownSymbol h)
463+instance (ToHttpApiData l, AllHeaderSamples ls, ToSample l, KnownSymbol h)
465 => AllHeaderSamples (Header h l ': ls) where
464 => AllHeaderSamples (Header h l ': ls) where
466 allHeaderToSample _ = mkHeader (toSample (Proxy :: Proxy l)) :
465 allHeaderToSample _ = mkHeader (toSample (Proxy :: Proxy l)) :
467 allHeaderToSample (Proxy :: Proxy ls)
466 allHeaderToSample (Proxy :: Proxy ls)
468 where headerName = CI.mk . cs $ symbolVal (Proxy :: Proxy h)
467 where headerName = CI.mk . cs $ symbolVal (Proxy :: Proxy h)
469− mkHeader (Just x) = (headerName, cs $ toByteString x)
468+ mkHeader (Just x) = (headerName, cs $ toHeader x)
470 mkHeader Nothing = (headerName, "<no header sample provided>")
469 mkHeader Nothing = (headerName, "<no header sample provided>")
471
470
472-- | Synthesise a sample value of a type, encoded in the specified media types.
471-- | Synthesise a sample value of a type, encoded in the specified media types.
servant-mock/servant-mock.cabal−1
@@ -69,5 +69,4 @@ test-suite spec
69 servant-server,
69 servant-server,
70 servant-mock,
70 servant-mock,
71 aeson,
71 aeson,
72− bytestring-conversion,
73 wai
72 wai
servant-server/servant-server.cabal−1
@@ -114,7 +114,6 @@ test-suite spec
114 , aeson
114 , aeson
115 , base64-bytestring
115 , base64-bytestring
116 , bytestring
116 , bytestring
117− , bytestring-conversion
118 , directory
117 , directory
119 , exceptions
118 , exceptions
120 , hspec == 2.*
119 , hspec == 2.*
servant-server/test/Servant/ServerSpec.hs−1
@@ -17,7 +17,6 @@ import Control.Monad (forM_, when, unless)
17import Control.Monad.Trans.Except (throwE)
17import Control.Monad.Trans.Except (throwE)
18import Data.Aeson (FromJSON, ToJSON, decode', encode)
18import Data.Aeson (FromJSON, ToJSON, decode', encode)
19import qualified Data.ByteString.Base64 as Base64
19import qualified Data.ByteString.Base64 as Base64
20−import Data.ByteString.Conversion ()
21import Data.Char (toUpper)
20import Data.Char (toUpper)
22import Data.Monoid
21import Data.Monoid
23import Data.Proxy (Proxy (Proxy))
22import Data.Proxy (Proxy (Proxy))