@@ -13,9 +13,8 @@ module Web.HttpApiData.Internal where
1313import Control.Applicative
1414import Data.Traversable (Traversable(traverse))
1515#endif
16−import Control.Arrow ((&&&))
16+import Control.Arrow ((&&&), left)
1717import Control.Monad ((<=<))
18−import Data.Either.Combinators (mapLeft)
1918
2019import Data.Monoid
2120import Data.ByteString (ByteString)
@@ -75,7 +74,7 @@ class FromHttpApiData a where
7574
7675 -- | Parse HTTP header value.
7776 parseHeader :: ByteString -> Either Text a
78− parseHeader = parseUrlPiece <=< (mapLeft (T.pack . show) . decodeUtf8')
77+ parseHeader = parseUrlPiece <=< (left (T.pack . show) . decodeUtf8')
7978
8079 -- | Parse query param value.
8180 parseQueryParam :: Text -> Either Text a