packages feed

happstack-hsp 6.2.4 → 6.2.5

raw patch · 6 files changed

+44/−16 lines, 6 filesdep ~bytestringdep ~sybdep ~utf8-string

Dependency ranges changed: bytestring, syb, utf8-string

Files

happstack-hsp.cabal view
@@ -1,5 +1,5 @@ Name:                happstack-hsp-Version:             6.2.4+Version:             6.2.5 Synopsis:            Support for using HSP templates in Happstack Description:         Happstack is a web application framework. HSP is an XML templating solution. This package makes it easy to use HSP templates with Happstack. Homepage:            http://www.happstack.com/@@ -19,6 +19,7 @@  Library   Hs-source-dirs:      src+   Exposed-modules:     Happstack.Server.HSP.HTML                        Happstack.Server.HSX                        HSP.Identity@@ -26,14 +27,15 @@                        HSP.ServerPartT                        HSP.WebT                        HSP.Google.Analytics-  Build-depends:       base >= 3.0 && < 5.0,-                       bytestring,++  Build-depends:       base             >= 3.0 && < 5.0,+                       bytestring       == 0.9.*,                        happstack-server >= 6.0 && < 6.5,                        harp             >= 0.4 && < 0.5,-                       hsx >= 0.9.1 && < 0.10,-                       hsp >= 0.6.1 && < 0.7,-                       mtl >= 1.1 && < 2.1,-                       utf8-string,-                       syb,-                       text >= 0.10 && < 0.12+                       hsx              >= 0.9.1 && < 0.10,+                       hsp              >= 0.6.1 && < 0.7,+                       mtl              >= 1.1 && < 2.1,+                       utf8-string      == 0.3.*,+                       syb              == 0.3.*,+                       text             >= 0.10 && < 0.12 
src/HSP/Google/Analytics.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE DeriveDataTypeable, FlexibleContexts #-}+{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, TypeFamilies #-} {-# OPTIONS_GHC -F -pgmFtrhsx #-} module HSP.Google.Analytics      ( UACCT(..)@@ -8,6 +8,7 @@  import Data.Generics (Data, Typeable) import HSP+import qualified HSX.XMLGenerator as HSX import Prelude hiding (head)  newtype UACCT = UACCT String -- ^ The UACCT provided to you by Google@@ -34,7 +35,8 @@ addAnalytics :: ( AppendChild m XML                 , EmbedAsChild m XML                 , EmbedAsAttr m Attribute-                , XMLGenerator m) +                , XMLGenerator m+                , HSX.XML m ~ XML)               => UACCT               -> XMLGenT m XML               -> GenXML m@@ -45,7 +47,7 @@          <html hattrs><[ head, body ]></html> ->              <html hattrs>                 <% head %>-                <% body <: a %>+                <% body <: (a :: [XML]) %>              </html>          o -> error ("Failed to add analytics." ++ show o) 
src/HSP/Identity.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances, TypeFamilies #-}+{-# LANGUAGE CPP, MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances, TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module HSP.Identity      ( Ident@@ -14,9 +14,15 @@ instance HSX.XMLGenerator Identity  instance HSX.XMLGen Identity where+#if __GLASGOW_HASKELL__ < 702     type HSX.XML Identity = XML     newtype HSX.Child Identity = IChild { unIChild :: XML }     newtype HSX.Attribute Identity = IAttr { unIAttr :: Attribute }+#else+    type XML Identity = XML+    newtype Child Identity = IChild { unIChild :: XML }+    newtype Attribute Identity = IAttr { unIAttr :: Attribute }+#endif     genElement n attrs children = HSX.XMLGenT $ Identity (Element                                                           (toName n)                                                           (map unIAttr $ concatMap runIdentity $ map HSX.unXMLGenT attrs)
src/HSP/IdentityT.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances, TypeFamilies, GeneralizedNewtypeDeriving #-}+{-# LANGUAGE CPP, MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances, TypeFamilies, GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -fno-warn-orphans -F -pgmF trhsx #-} module HSP.IdentityT      ( evalIdentityT@@ -35,9 +35,15 @@ instance (Monad m, Functor m) => HSX.XMLGenerator (IdentityT m)  instance (Functor m, Monad m) => HSX.XMLGen (IdentityT m) where+#if __GLASGOW_HASKELL__ < 702     type HSX.XML (IdentityT m) = XML     newtype HSX.Child (IdentityT m) = IChild { unIChild :: XML }     newtype HSX.Attribute (IdentityT m) = IAttr { unIAttr :: Attribute }+#else+    type XML (IdentityT m) = XML+    newtype Child (IdentityT m) = IChild { unIChild :: XML }+    newtype Attribute (IdentityT m) = IAttr { unIAttr :: Attribute }+#endif     genElement n attrs children = HSX.XMLGenT $                                    do attrs'    <- HSX.unXMLGenT (fmap (map unIAttr . concat) (sequence attrs))                                      children' <- HSX.unXMLGenT (fmap (map unIChild . concat) (sequence children))
src/HSP/ServerPartT.hs view
@@ -1,5 +1,5 @@ -- |This module provides, @instance 'XMLGenerator' ('ServerPartT' m)@-{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances, TypeFamilies #-}+{-# LANGUAGE CPP, MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances, TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module HSP.ServerPartT () where @@ -11,9 +11,15 @@ import Happstack.Server (ServerPartT)  instance (Monad m) => HSX.XMLGen (ServerPartT m) where+#if __GLASGOW_HASKELL__ < 702     type HSX.XML (ServerPartT m) = XML     newtype HSX.Child (ServerPartT m) = SChild { unSChild :: XML }     newtype HSX.Attribute (ServerPartT m) = SAttr { unSAttr :: Attribute }+#else+    type XML (ServerPartT m) = XML+    newtype Child (ServerPartT m) = SChild { unSChild :: XML }+    newtype Attribute (ServerPartT m) = SAttr { unSAttr :: Attribute }+#endif     genElement n attrs children =          do attribs <- map unSAttr `liftM` asAttr attrs            childer <- (flattenCDATA . map unSChild) `liftM`asChild children
src/HSP/WebT.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances, TypeFamilies #-}+{-# LANGUAGE CPP, MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances, TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module HSP.WebT where @@ -10,9 +10,15 @@ import Happstack.Server.Internal.Monads (WebT)  instance (Monad m) => HSX.XMLGen (WebT m) where+#if __GLASGOW_HASKELL__ < 702     type HSX.XML (WebT m) = XML     newtype HSX.Child (WebT m) = WChild { unWChild :: XML }     newtype HSX.Attribute (WebT m) = WAttr { unWAttr :: Attribute }+#else+    type XML (WebT m) = XML+    newtype Child (WebT m) = WChild { unWChild :: XML }+    newtype Attribute (WebT m) = WAttr { unWAttr :: Attribute }+#endif     genElement n attrs children =          do attribs <- map unWAttr `liftM` asAttr attrs            childer <- (flattenCDATA . map unWChild) `liftM` asChild children