packages feed

servant-xml 1.0.1.3 → 1.0.1.4

raw patch · 3 files changed

+31/−33 lines, 3 filesdep ~xmlbfdep ~xmlbf-xenoPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: xmlbf, xmlbf-xeno

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # CHANGELOG +### 1.0.1.4++- Support for recent versions of `xmlbf` and `xmlbf-xeno`.+ ### 1.0.1.3  - Bump various bounds.
servant-xml.cabal view
@@ -1,38 +1,31 @@-cabal-version: 1.12---- This file has been generated from package.yaml by hpack version 0.31.1.------ see: https://github.com/sol/hpack------ hash: 97a99fcae4e059f0d0b5445a0b82c87d8b97f3ec7cf3671a78a14196ee774638+cabal-version: 1.24  name:           servant-xml-version:        1.0.1.3+version:        1.0.1.4 synopsis:       Servant support for the XML Content-Type description:    Servant support for the Content-Type of /application\/xml/. Anything with 'ToXml' and 'FromXml' instances can be automatically marshalled. category:       Web homepage:       https://github.com/fosskers/servant-xml author:         Colin Woodbury-maintainer:     colingw@gmail.com-copyright:      2018 Colin Woodbury+maintainer:     colin@fosskers.ca+copyright:      2018 - 2019 Colin Woodbury license:        BSD3 license-file:   LICENSE build-type:     Simple+ extra-source-files:     README.md     CHANGELOG.md  library-  hs-source-dirs:-      src-  ghc-options: -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -Widentities+  default-language: Haskell2010+  hs-source-dirs: src+  ghc-options: -Wall   build-depends:-      base >=4.7 && <5+      base >= 4.7 && <5     , bytestring-    , http-media >=0.7-    , servant >=0.11-    , xmlbf >=0.4-    , xmlbf-xeno >=0.1-  exposed-modules:-      Servant.XML-  default-language: Haskell2010+    , http-media >= 0.7+    , servant >= 0.11+    , xmlbf >= 0.5+    , xmlbf-xeno >= 0.2+  exposed-modules: Servant.XML
src/Servant/XML.hs view
@@ -1,20 +1,21 @@-{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}-{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE FlexibleInstances     #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE OverloadedStrings     #-}  -- | -- Module    : Servant.XML--- Copyright : (c) Colin Woodbury, 2018+-- Copyright : (c) Colin Woodbury, 2018 - 2019 -- License   : BSD3--- Maintainer: Colin Woodbury <colingw@gmail.com>+-- Maintainer: Colin Woodbury <colin@fosskers.ca> -- -- Servant support for XML. ----- Types with a `ToXml` instance will be automatically marshalled into XML--- and successfully returned by Servant endpoints.--- Types with a `FromXml` instance can be decoded from request bodies.+-- Types with a `ToXml` instance will be automatically marshalled into XML and+-- successfully returned by Servant endpoints. Types with a `FromXml` instance+-- can be decoded from request bodies. ----- In implementing these typeclass instances, you can use the primitives--- found in the /xmlbf/ library.+-- In implementing these typeclass instances, you can use the primitives found+-- in the /xmlbf/ library.  module Servant.XML where @@ -22,8 +23,8 @@ import           Data.ByteString.Lazy (toStrict) import qualified Network.HTTP.Media as M import           Servant.API-import           Xmlbf-import           Xmlbf.Xeno+import           Xmlbf (FromXml(..), ToXml(..), encode, runParser)+import           Xmlbf.Xeno (fromRawXml)  --- @@ -48,4 +49,4 @@   mimeRender _ = toLazyByteString . encode . toXml  instance FromXml a => MimeUnrender XML a where-  mimeUnrender _ bs = nodes (toStrict bs) >>= runParser fromXml+  mimeUnrender _ bs = fromRawXml (toStrict bs) >>= runParser fromXml