packages feed

snap-app 0.6.0 → 0.6.1

raw patch · 7 files changed

+13/−14 lines, 7 filesdep +network-uridep −network

Dependencies added: network-uri

Dependencies removed: network

Files

snap-app.cabal view
@@ -1,7 +1,7 @@ name:                snap-app-version:             0.6.0+version:             0.6.1 synopsis:            Simple modules for writing apps with Snap, abstracted from hpaste.-homepage:            Simple modules for writing apps with Snap, abstracted from hpaste.+homepage:            https://github.com/chrisdone/snap-app license:             BSD3 license-file:        LICENSE author:              Chris Done@@ -11,7 +11,7 @@ cabal-version:       >=1.8  library-  ghc-options:       -O2+  ghc-options:       -O2 -Wall -fno-warn-type-defaults   hs-source-dirs:    src   exposed-modules:   Snap.App, Snap.App.Types, Snap.App.Controller, Snap.App.Model, Snap.App.Migrate,                      Snap.App.Cache, Snap.App.XML, Snap.App.RSS,@@ -21,7 +21,7 @@   other-modules:     Control.Monad.Catch   build-depends:     base >= 4 && <5,                      snap-core,-                     network,+                     network-uri,                      postgresql-simple,                      mtl,                      blaze-html >= 0.6,
src/Snap/App/Cache.hs view
@@ -20,7 +20,7 @@ import           System.Directory import           System.FilePath import           Text.Blaze-import           Text.Blaze.Renderer.Text+import           Text.Blaze.Html.Renderer.Text  -- | A key for the cache. class Key key where
src/Snap/App/Controller.hs view
@@ -30,10 +30,9 @@ import Data.Pagination import Network.URI import Data.Text.Lazy             (Text,toStrict)-import Database.PostgreSQL.Simple import Safe                       (readMay) import Text.Blaze                 (Markup)-import Text.Blaze.Renderer.Text   (renderHtml)+import Text.Blaze.Html.Renderer.Text (renderHtml) import Text.Blaze.Pagination (PN(..))  -- | Run a controller handler.
src/Snap/App/Migrate.hs view
@@ -6,7 +6,6 @@ import Snap.App.Model import Control.Monad import Control.Monad.Trans-import Database.PostgreSQL.Simple (Only(..)) import GHC.Int  -- | Migrate the DB to the latest version.
src/Snap/App/Model.hs view
@@ -113,4 +113,4 @@   , poolConnectInfo :: ConnectInfo   } -newtype Pool = Pool { unPool :: MVar PoolState }+newtype Pool = Pool (MVar PoolState)
src/Snap/App/RSS.hs view
@@ -1,3 +1,5 @@+-- | Output RSS feeds.+ module Snap.App.RSS where  import           Data.Text (Text)@@ -10,7 +12,6 @@ import           Text.Feed.Types import           Text.RSS.Syntax import           Text.XML.Light-import           Text.XML.Light  -- | Output the given XML element. outputRSS :: String -> String -> [(UTCTime,Text,Text,Text)] -> Controller c s ()@@ -23,10 +24,10 @@                { rssChannel = makeChannel qs }   makeChannel qs = (nullChannel title link)                    { rssItems = map makeItem qs }-  makeItem (time,title,desc,link) =-    (nullItem (T.unpack title))+  makeItem (time,itemtitle,desc,itemlink) =+    (nullItem (T.unpack itemtitle))     { rssItemPubDate = return (toPubDate time)     , rssItemDescription = return (T.unpack desc)-    , rssItemLink = return (T.unpack link)+    , rssItemLink = return (T.unpack itemlink)     }   toPubDate = formatTime defaultTimeLocale "%a, %d %b %Y %H:%M:%S UT"
src/Text/Blaze/Pagination.hs view
@@ -56,7 +56,7 @@           div !. "pages" $ do             ul !. "pages-list" $ do               when (pnCurrentPage > 1) $ do-                li !. "page" $ a ! hrefSet uri paramName (show 1) $+                li !. "page" $ a ! hrefSet uri paramName "1" $                   "First"                 li !. "page" $ a ! hrefSet uri paramName (show (pnCurrentPage-1)) $                   "Previous"