packages feed

webpage 0.0.5 → 0.0.5.1

raw patch · 4 files changed

+58/−61 lines, 4 filesdep ~basesetup-changed

Dependency ranges changed: base

Files

+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
src/Web/Page/Hastache.hs view
@@ -10,7 +10,6 @@ import qualified Data.Text as T import qualified Data.Text.Lazy as LT -import Data.Monoid  -- | 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
src/Web/Page/Types.hs view
@@ -5,8 +5,7 @@  module Web.Page.Types where -import Data.Default-import Data.Monoid+import Data.Default (Default (def))  -- | Generic layout for a web page. We keep the data type purely parametric to -- allow for record-syntax overloading / reassignment, like this:@@ -28,21 +27,26 @@   } deriving (Show, Eq, Ord)  +instance ( Semigroup m+         , Semigroup a+         , Semigroup s+         ) => Semigroup (WebPage m a s) where+  (WebPage t1 f1 m1 is1 bs1 s1 as1 b1 bss1) <> (WebPage t2 f2 m2 is2 bs2 s2 as2 b2 bss2) =+    WebPage (t1 <> t2)+            (f1 <> f2)+            (m1 <> m2)+            (is1 <> is2)+            (bs1 <> bs2)+            (s1 <> s2)+            (as1 <> as2)+            (b1 <> b2)+            (bss1 <> bss2)+ instance ( Monoid m          , Monoid a          , 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)-            (is1 `mappend` is2)-            (bs1 `mappend` bs2)-            (s1 `mappend` s2)-            (as1 `mappend` as2)-            (b1 `mappend` b2)-            (bss1 `mappend` bss2)   instance ( Monoid m
webpage.cabal view
@@ -1,50 +1,42 @@-Name:                   webpage-Version:                0.0.5-Author:                 Athan Clark <athan.clark@gmail.com>-Maintainer:             Athan Clark <athan.clark@gmail.com>-License:                MIT-License-File:           LICENSE-Synopsis:               Organized and simple web page scaffold for blaze and lucid-Description:-  This is a general organization scheme for web pages, implemented for Lucid,-  and adapted for Blaze-html.-  .-  >  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 = 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>"-  .-Cabal-Version:          >= 1.10-Build-Type:             Simple+cabal-version: 1.12 -Library-  Default-Language:     Haskell2010-  HS-Source-Dirs:       src-  GHC-Options:          -Wall-  Exposed-Modules:      Web.Page.Types-                        Web.Page.Lucid-                        Web.Page.Blaze-                        Web.Page.Hastache-  Build-Depends:        base >= 4 && < 5-                      , lucid >= 2.5-                      , blaze-html-                      , text-                      , data-default+-- This file has been generated from package.yaml by hpack version 0.31.1.+--+-- see: https://github.com/sol/hpack+--+-- hash: 2461a8c525bd79018da4acab11de5a0673c5ce9994cf50af14db936702f502ff -Source-Repository head-  Type:                 git-  Location:             https://github.com/athanclark/webpage.git+name:           webpage+version:        0.0.5.1+synopsis:       Organized and simple web page scaffold for blaze and lucid+description:    Please see the README on Github at <https://github.com/athanclark/webpage#readme>+category:       Web+homepage:       https://github.com/athanclark/webpage#readme+bug-reports:    https://github.com/athanclark/webpage/issues+maintainer:     Athan Clark <athan.clark@gmail.com>+license:        BSD3+license-file:   LICENSE+build-type:     Simple++source-repository head+  type: git+  location: https://github.com/athanclark/webpage++library+  exposed-modules:+      Web.Page.Blaze+      Web.Page.Hastache+      Web.Page.Lucid+      Web.Page.Types+  other-modules:+      Paths_webpage+  hs-source-dirs:+      src+  ghc-options: -Wall+  build-depends:+      base >=4.11 && <5+    , blaze-html+    , data-default+    , lucid >=2.5+    , text+  default-language: Haskell2010