git.iko.soy/typeable/servant
on master help sign in
Remove all use of bytestring-conversion
commit5bef76ed03772d271be55801f6bc480cbe8f7baf authorAlex Mason <Alex.Mason@data61.csiro.au> dateFri 2 Sep 2016, 23:27 (10 years ago) parent9b5a564
5 files changed+2−8
servant-docs/servant-docs.cabal−2 servant-docs/src/Servant/Docs/Internal.hs+2−3 servant-mock/servant-mock.cabal−1 servant-server/servant-server.cabal−1 servant-server/test/Servant/ServerSpec.hs−1
servant-docs/servant-docs.cabal−2
@@ -36,7 +36,6 @@ library
3636 , aeson
3737 , aeson-pretty
3838 , bytestring
39− , bytestring-conversion
4039 , case-insensitive
4140 , hashable
4241 , http-media >= 0.6
@@ -61,7 +60,6 @@ executable greet-docs
6160 build-depends:
6261 base
6362 , aeson
64− , bytestring-conversion
6563 , lens
6664 , servant
6765 , servant-docs
servant-docs/src/Servant/Docs/Internal.hs+2−3
@@ -25,7 +25,6 @@ import Control.Arrow (second)
2525import Control.Lens (makeLenses, mapped, over, traversed, view, (%~),
2626 (&), (.~), (<>~), (^.), (|>))
2727import qualified Control.Monad.Omega as Omega
28−import Data.ByteString.Conversion (ToByteString, toByteString)
2928import Data.ByteString.Lazy.Char8 (ByteString)
3029import qualified Data.ByteString.Char8 as BSC
3130import qualified Data.CaseInsensitive as CI
@@ -461,12 +460,12 @@ class AllHeaderSamples ls where
461460instance AllHeaderSamples '[] where
462461 allHeaderToSample _ = []
463462
464−instance (ToByteString l, AllHeaderSamples ls, ToSample l, KnownSymbol h)
463+instance (ToHttpApiData l, AllHeaderSamples ls, ToSample l, KnownSymbol h)
465464 => AllHeaderSamples (Header h l ': ls) where
466465 allHeaderToSample _ = mkHeader (toSample (Proxy :: Proxy l)) :
467466 allHeaderToSample (Proxy :: Proxy ls)
468467 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)
470469 mkHeader Nothing = (headerName, "<no header sample provided>")
471470
472471-- | 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
6969 servant-server,
7070 servant-mock,
7171 aeson,
72− bytestring-conversion,
7372 wai
servant-server/servant-server.cabal−1
@@ -114,7 +114,6 @@ test-suite spec
114114 , aeson
115115 , base64-bytestring
116116 , bytestring
117− , bytestring-conversion
118117 , directory
119118 , exceptions
120119 , hspec == 2.*
servant-server/test/Servant/ServerSpec.hs−1
@@ -17,7 +17,6 @@ import Control.Monad (forM_, when, unless)
1717import Control.Monad.Trans.Except (throwE)
1818import Data.Aeson (FromJSON, ToJSON, decode', encode)
1919import qualified Data.ByteString.Base64 as Base64
20−import Data.ByteString.Conversion ()
2120import Data.Char (toUpper)
2221import Data.Monoid
2322import Data.Proxy (Proxy (Proxy))