Hello community,

here is the log from the commit of package ghc-webpage for openSUSE:Factory 
checked in at 2017-05-09 18:07:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-webpage (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-webpage.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-webpage"

Tue May  9 18:07:29 2017 rev:2 rq:493524 version:0.0.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-webpage/ghc-webpage.changes  2016-11-10 
13:17:26.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-webpage.new/ghc-webpage.changes     
2017-05-09 18:07:29.556072667 +0200
@@ -1,0 +2,5 @@
+Tue Apr  4 11:04:09 UTC 2017 - [email protected]
+
+- Update to version 0.0.5 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  webpage-0.0.4.tar.gz

New:
----
  webpage-0.0.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-webpage.spec ++++++
--- /var/tmp/diff_new_pack.SvPDOG/_old  2017-05-09 18:07:30.367957939 +0200
+++ /var/tmp/diff_new_pack.SvPDOG/_new  2017-05-09 18:07:30.367957939 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-webpage
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,39 +18,35 @@
 
 %global pkg_name webpage
 Name:           ghc-%{pkg_name}
-Version:        0.0.4
+Version:        0.0.5
 Release:        0
 Summary:        Organized and simple web page scaffold for blaze and lucid
-License:        MIT
-Group:          System/Libraries
+License:        BSD-3-Clause
+Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-blaze-html-devel
 BuildRequires:  ghc-data-default-devel
 BuildRequires:  ghc-lucid-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
 
 %description
 This is a general organization scheme for web pages, implemented for Lucid, and
 adapted for Blaze-html.
 
-It's as easy as 1-2-3:
-
 > import Web.Page.Lucid > > λ> renderText $ template def "some content" > > ↪
 "<!DOCTYPE HTML><html><head><title></title><link href >
 rel="icon"></head><body>some content</body></html>"
 
 overload the particular areas with record syntax and stuff:
 
-> λ> let page = WebPage > "foo" > mempty > mempty > mempty > mempty > mempty >
-mempty > (script_ [src_ "jquery.js"] "") > > > λ> template page "some content"
-> > ↪ "<!DOCTYPE HTML><html><head><title>foo</title> > </head><body>some
-content<script > src="jquery.js"></script></body></html>" .
+> λ> let page = def title = "foo" > , bodyScripts = script_ [src_ "jquery.js"]
+"" > > > λ> template page "some content" > > ↪ "<!DOCTYPE
+HTML><html><head><title>foo</title> > </head><body>some content<script >
+src="jquery.js"></script></body></html>" .
 
 %package devel
 Summary:        Haskell %{pkg_name} library development files
@@ -68,15 +64,12 @@
 echo > Setup.hs 'import Distribution.Simple'
 echo >>Setup.hs 'main = defaultMain'
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %post devel
 %ghc_pkg_recache
 

++++++ webpage-0.0.4.tar.gz -> webpage-0.0.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/webpage-0.0.4/src/Web/Page/Blaze.hs 
new/webpage-0.0.5/src/Web/Page/Blaze.hs
--- old/webpage-0.0.4/src/Web/Page/Blaze.hs     2015-11-10 20:03:48.000000000 
+0100
+++ new/webpage-0.0.5/src/Web/Page/Blaze.hs     2017-03-29 20:58:30.000000000 
+0200
@@ -10,23 +10,22 @@
 import Web.Page.Types as X
 
 import qualified Text.Blaze.Html5 as H
-
 import qualified Data.Text as T
 
 -- | You should really be using Lucid...
-template :: WebPage H.Html T.Text
+template :: WebPage H.Html T.Text H.Attribute
          -> H.Html
          -> H.Html
-template page content = do
+template page content =
   H.docTypeHtml $ do
-    (H.head $ do
+    H.head $ do
       initScripts page
-      (H.title $ H.toHtml $ pageTitle page)
+      H.title $ H.toHtml $ pageTitle page
       metaVars page
       favicon page
       beforeStylesScripts page
       styles page
-      afterStylesScripts page)
-    H.body $ do
+      afterStylesScripts page
+    H.body H.! bodyStyles page $ do
       content
       bodyScripts page
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/webpage-0.0.4/src/Web/Page/Hastache.hs 
new/webpage-0.0.5/src/Web/Page/Hastache.hs
--- old/webpage-0.0.4/src/Web/Page/Hastache.hs  2015-11-10 20:04:29.000000000 
+0100
+++ new/webpage-0.0.5/src/Web/Page/Hastache.hs  2017-03-29 20:58:07.000000000 
+0200
@@ -15,7 +15,7 @@
 -- | We choose to not interpolate the @WebPage@ data type as a JSON Hastache
 -- template value because I don't want the portions of @WebPage@ visible by
 -- @content@.
-template :: WebPage LT.Text T.Text
+template :: WebPage LT.Text T.Text T.Text
          -> LT.Text
          -> LT.Text
 template page content = mconcat
@@ -23,14 +23,14 @@
   , "<html>"
   , "<head>"
   , initScripts page
-  , "<title>" <> (LT.fromStrict $ pageTitle page) <> "</title>"
+  , "<title>" <> LT.fromStrict (pageTitle page) <> "</title>"
   , metaVars page
   , favicon page
   , beforeStylesScripts page
   , styles page
   , afterStylesScripts page
   , "</head>"
-  , "<body>"
+  , "<body style=\"" <> LT.fromStrict (bodyStyles page) <> "\" >"
   , content
   , bodyScripts page
   , "</body>"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/webpage-0.0.4/src/Web/Page/Lucid.hs 
new/webpage-0.0.5/src/Web/Page/Lucid.hs
--- old/webpage-0.0.4/src/Web/Page/Lucid.hs     2015-11-10 20:03:54.000000000 
+0100
+++ new/webpage-0.0.5/src/Web/Page/Lucid.hs     2017-03-29 20:37:00.000000000 
+0200
@@ -1,7 +1,6 @@
 {-# LANGUAGE
     OverloadedStrings
   , ExtendedDefaultRules
-  , BangPatterns
   #-}
 
 module Web.Page.Lucid
@@ -18,21 +17,18 @@
 
 -- | Generic page template implemented in Lucid.
 template :: Monad m =>
-            WebPage (HtmlT m ()) T.Text -- ^ Page information
+            WebPage (HtmlT m ()) T.Text [Attribute] -- ^ Page information
          -> HtmlT m () -- ^ Content to insert in @\<body\>@
          -> HtmlT m ()
-template page content = doctypehtml_ $ mconcat $
-  [ head_ [] $ mconcat $
-      [ initScripts page
-      , title_ $ toHtmlRaw $ pageTitle page
-      , metaVars page
-      , favicon page
-      , beforeStylesScripts page
-      , styles page
-      , afterStylesScripts page
-      ]
-  , body_ [] $ mconcat $
-      [ content
-      , bodyScripts page
-      ]
-  ]
+template page content = doctypehtml_ $ do
+  head_ [] $ do
+    initScripts page
+    title_ $ toHtmlRaw $ pageTitle page
+    metaVars page
+    favicon page
+    beforeStylesScripts page
+    styles page
+    afterStylesScripts page
+  body_ (bodyStyles page) $ do
+    content
+    bodyScripts page
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/webpage-0.0.4/src/Web/Page/Types.hs 
new/webpage-0.0.5/src/Web/Page/Types.hs
--- old/webpage-0.0.4/src/Web/Page/Types.hs     2015-11-10 20:01:01.000000000 
+0100
+++ new/webpage-0.0.5/src/Web/Page/Types.hs     2017-03-29 20:57:44.000000000 
+0200
@@ -15,7 +15,7 @@
 -- >  page :: WebPage (Html ()) T.Text
 -- @ page' = page \{pageTitle = "foo!"\}@
 --
-data WebPage markup attr = WebPage
+data WebPage markup attr attrSet = WebPage
   { pageTitle           :: attr -- ^ Page title
   , favicon             :: markup -- ^ Favicon tags
   , metaVars            :: markup -- ^ @\<meta\>@ tags
@@ -24,14 +24,16 @@
   , styles              :: markup -- ^ Styles
   , afterStylesScripts  :: markup -- ^ JavaScript to include after @\<style\>@ 
tags - ie: <http://modernizr.com Modernizr>
   , bodyScripts         :: markup -- ^ JavaScript to include at the base of 
@\<body\>@
+  , bodyStyles          :: attrSet -- ^ Additional styles to assign to 
@\<body\>@
   } deriving (Show, Eq, Ord)
 
 
 instance ( Monoid m
          , Monoid a
-         ) => Monoid (WebPage m a) where
-  mempty = WebPage mempty mempty mempty mempty mempty mempty mempty mempty
-  mappend (WebPage t1 f1 m1 is1 bs1 s1 as1 b1) (WebPage t2 f2 m2 is2 bs2 s2 
as2 b2) =
+         , Monoid s
+         ) => Monoid (WebPage m a s) where
+  mempty = WebPage mempty mempty mempty mempty mempty mempty mempty mempty 
mempty
+  mappend (WebPage t1 f1 m1 is1 bs1 s1 as1 b1 bss1) (WebPage t2 f2 m2 is2 bs2 
s2 as2 b2 bss2) =
     WebPage (t1 `mappend` t2)
             (f1 `mappend` f2)
             (m1 `mappend` m2)
@@ -40,9 +42,11 @@
             (s1 `mappend` s2)
             (as1 `mappend` as2)
             (b1 `mappend` b2)
+            (bss1 `mappend` bss2)
 
 
 instance ( Monoid m
          , Monoid a
-         ) => Default (WebPage m a) where
+         , Monoid s
+         ) => Default (WebPage m a s) where
   def = mempty
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/webpage-0.0.4/webpage.cabal 
new/webpage-0.0.5/webpage.cabal
--- old/webpage-0.0.4/webpage.cabal     2015-11-10 20:06:44.000000000 +0100
+++ new/webpage-0.0.5/webpage.cabal     2017-03-29 20:59:49.000000000 +0200
@@ -1,5 +1,5 @@
 Name:                   webpage
-Version:                0.0.4
+Version:                0.0.5
 Author:                 Athan Clark <[email protected]>
 Maintainer:             Athan Clark <[email protected]>
 License:                MIT
@@ -9,8 +9,6 @@
   This is a general organization scheme for web pages, implemented for Lucid,
   and adapted for Blaze-html.
   .
-  It's as easy as 1-2-3:
-  .
   >  import Web.Page.Lucid
   >
   >  λ> renderText $ template def "some content"
@@ -20,15 +18,8 @@
   .
   overload the particular areas with record syntax and stuff:
   .
-  >  λ> let page = WebPage
-  >                  "foo"
-  >                  mempty
-  >                  mempty
-  >                  mempty
-  >                  mempty
-  >                  mempty
-  >                  mempty
-  >                  (script_ [src_ "jquery.js"] "")
+  >  λ> let page = def { title = "foo"
+  >                    , bodyScripts = script_ [src_ "jquery.js"] ""}
   >
   >
   >  λ> template page "some content"


Reply via email to