packages feed

servant-lucid 0.8.1 → 0.9.0.6

raw patch · 4 files changed

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.9++- Also accept content type without character set i.e `text/html`+ # 0.8.1  - Support `servant-0.14`
servant-lucid.cabal view
@@ -1,5 +1,7 @@+cabal-version:       >=1.10 name:                servant-lucid-version:             0.8.1+version:             0.9.0.6+ synopsis:            Servant support for lucid description:   Servant support for lucid.@@ -7,23 +9,18 @@   'HTML' content type which will use `ToHtml` class.   .   Lucid.Servant uses `Link` rather than `Text` for safe 'href' attributes.+ homepage:            http://haskell-servant.readthedocs.org/+bug-reports:         http://github.com/haskell-servant/servant-lucid/issues license:             BSD3 license-file:        LICENSE author:              Servant Contributors maintainer:          haskell-servant-maintainers@googlegroups.com-copyright:           2015-2016 Servant Contributors+copyright:           2015-2018 Servant Contributors category:            Web, Servant build-type:          Simple extra-source-files:  CHANGELOG.md-cabal-version:       >=1.10-bug-reports:         http://github.com/haskell-servant/servant-lucid/issues-tested-with:-  GHC==7.8.4,-  GHC==7.10.3,-  GHC==8.0.2,-  GHC==8.2.2,-  GHC==8.4.3+tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2  source-repository head   type: git@@ -32,14 +29,14 @@ library   exposed-modules:     Servant.HTML.Lucid                        Lucid.Servant-  build-depends:       base       >=4.7     && <5-                     , http-media >=0.6.4   && <0.8-                     , lucid      >=2.9.8   && <2.10-                     , text       >=1.2.3.0 && <1.3-                     , servant    >=0.14    && <0.15+  build-depends:       base       >=4.9     && <5+                     , http-media >=0.6.4   && <0.9+                     , lucid      >=2.9.8   && <2.12+                     , text       >=1.2.3.0 && <1.3 || >= 2 && < 2.1+                     , servant    >=0.17    && <0.20    if !impl(ghc >= 8.0)-    build-depends:     semigroups >=0.18.4  && <0.19+    build-depends:     semigroups >=0.18.4  && <0.20    hs-source-dirs:      src   default-language:    Haskell2010@@ -55,7 +52,7 @@       base     , lucid     , servant-lucid-    , servant-server >=0.14     && <0.15+    , servant-server >=0.14     && <0.20     , wai            >=3.0.3.0  && <3.3-    , warp           >=3.0.13.1 && <3.3+    , warp           >=3.0.13.1 && <3.4   default-language: Haskell2010
src/Lucid/Servant.hs view
@@ -24,7 +24,7 @@                  (href_) import           Servant.API                  (toUrlPiece)-import           Servant.Utils.Links+import           Servant.Links                  (HasLink, IsElem, Link, MkLink, safeLink')  -- | 'safeLink' variant which creates lucid's 'Attribute' given base url.
src/Servant/HTML/Lucid.hs view
@@ -14,6 +14,7 @@ -- Will then check that @a@ has a `ToHtml` instance, or is `Html`. module Servant.HTML.Lucid where +import qualified Data.List.NonEmpty as NE import           Data.Typeable      (Typeable) import           Lucid              (ToHtml (..), renderBS) import qualified Network.HTTP.Media as M@@ -23,7 +24,9 @@  -- | @text/html;charset=utf-8@ instance Accept HTML where-    contentType _ = "text" M.// "html" M./: ("charset", "utf-8")+    contentTypes _ =+      "text" M.// "html" M./: ("charset", "utf-8") NE.:|+      ["text" M.// "html"]  instance ToHtml a => MimeRender HTML a where     mimeRender _ = renderBS . toHtml