packages feed

lucid 2.9.7 → 2.9.8

raw patch · 4 files changed

+31/−4 lines, 4 filesnew-uploaderPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Lucid.Base: instance (a ~ (), m ~ Data.Functor.Identity.Identity) => Lucid.Base.ToHtml (Lucid.Base.HtmlT m a)
+ Lucid.Html5: classes_ :: [Text] -> Attribute
+ Lucid.Html5: crossorigin_ :: Text -> Attribute
+ Lucid.Html5: integrity_ :: Text -> Attribute

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+## 2.9.8++* Add `integrity_`, `crossorigin_` attributes+* Add `classes_` smart attribute constructor+* Add `ToHtml (HtmlT m a)` instance+ ## 2.9.6  * Fix compilation of benchmarks
lucid.cabal view
@@ -1,5 +1,5 @@ name:                lucid-version:             2.9.7+version:             2.9.8 synopsis:            Clear to write, read and edit DSL for HTML description:         Clear to write, read and edit DSL for HTML. See the 'Lucid' module                      for description and documentation.@@ -7,8 +7,8 @@ license:             BSD3 license-file:        LICENSE author:              Chris Done-maintainer:          chrisdone@gmail.com-copyright:           2014 Chris Done+maintainer:          chrisdone@gmail.com, oleg.grenrus@iki.fi+copyright:           2014-2017 Chris Done category:            Web build-type:          Simple cabal-version:       >=1.8
src/Lucid/Base.hs view
@@ -162,6 +162,10 @@   toHtml :: Monad m => a -> HtmlT m ()   toHtmlRaw :: Monad m => a -> HtmlT m () +instance (a ~ (), m ~ Identity) => ToHtml (HtmlT m a) where+  toHtml = relaxHtmlT+  toHtmlRaw = relaxHtmlT+ instance ToHtml String where   toHtml    = build . Blaze.fromHtmlEscapedString   toHtmlRaw = build . Blaze.fromString
src/Lucid/Html5.hs view
@@ -9,8 +9,11 @@ import           Lucid.Base  import           Data.Monoid-import           Data.Text (Text)+import           Data.Text (Text, unwords) +-------------------------------------------------------------------------------+-- Elements+ -- | @DOCTYPE@ element doctype_ :: Monad m => HtmlT m () doctype_ = makeElementNoEnd "!DOCTYPE HTML"@@ -457,6 +460,9 @@ wbr_ :: Monad m => [Attribute] -> HtmlT m () wbr_ = with (makeElementNoEnd "wbr") +-------------------------------------------------------------------------------+-- Attributes+ -- | The @accept@ attribute. accept_ :: Text -> Attribute accept_ = makeAttribute "accept"@@ -509,6 +515,9 @@ class_ :: Text -> Attribute class_ = makeAttribute "class" +classes_ :: [Text] -> Attribute+classes_ = makeAttribute "class" . Data.Text.unwords+ -- | The @cols@ attribute. cols_ :: Text -> Attribute cols_ = makeAttribute "cols"@@ -537,6 +546,10 @@ coords_ :: Text -> Attribute coords_ = makeAttribute "coords" +-- | The @crossorigin@ attribute.+crossorigin_ :: Text -> Attribute+crossorigin_ = makeAttribute "crossorigin"+ -- | The @data@ attribute. data_ :: Text -> Text -> Attribute data_ name = makeAttribute ("data-" <> name)@@ -628,6 +641,10 @@ -- | The @id@ attribute. id_ :: Text -> Attribute id_ = makeAttribute "id"++-- | The @integrity@ attribute.+integrity_ :: Text -> Attribute+integrity_ = makeAttribute "integrity"  -- | The @ismap@ attribute. ismap_ :: Text -> Attribute