Skip to content

Commit

Permalink
removed dependency on bytestring-conversion (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
esjmb authored and valpackett committed Jan 4, 2019
1 parent afb8f94 commit 0897d57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion http-link-header.cabal
Expand Up @@ -29,7 +29,6 @@ library
, network-uri
, http-api-data
, attoparsec
, bytestring-conversion
default-language: Haskell2010
exposed-modules:
Network.HTTP.Link
Expand Down
14 changes: 4 additions & 10 deletions library/Network/HTTP/Link.hs
Expand Up @@ -8,22 +8,16 @@ module Network.HTTP.Link (
, module Network.HTTP.Link.Parser
) where

import Data.ByteString.Conversion
import Web.HttpApiData
import Data.Text.Encoding
import safe Network.HTTP.Link.Parser
import safe Network.HTTP.Link.Types
import safe Network.HTTP.Link.Writer
import safe Network.HTTP.Link.Parser

instance ToByteString [Link] where
builder = builder . writeLinkHeader

instance ToByteString Link where
builder = builder . writeLink

instance ToHttpApiData [Link] where
toUrlPiece = toUrlPiece . writeLinkHeader
toHeader = toByteString'
toHeader = encodeUtf8 . writeLinkHeader

instance ToHttpApiData Link where
toUrlPiece = toUrlPiece . writeLink
toHeader = toByteString'
toHeader = encodeUtf8 . writeLink

0 comments on commit 0897d57

Please sign in to comment.