blaze-colonnade 1.2.1 → 1.2.2
raw patch · 2 files changed
+10/−6 lines, 2 filesdep ~basedep ~textPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, text
API changes (from Hackage documentation)
+ Text.Blaze.Colonnade: instance Data.Semigroup.Semigroup Text.Blaze.Colonnade.Cell
Files
- blaze-colonnade.cabal +3/−3
- src/Text/Blaze/Colonnade.hs +7/−3
blaze-colonnade.cabal view
@@ -1,5 +1,5 @@ name: blaze-colonnade-version: 1.2.1+version: 1.2.2 synopsis: Helper functions for using blaze-html with colonnade description: Blaze HTML and colonnade homepage: https://github.com/andrewthad/colonnade#readme@@ -17,11 +17,11 @@ exposed-modules: Text.Blaze.Colonnade build-depends:- base >= 4.7 && < 5+ base >= 4.9 && < 5 , colonnade >= 1.1 && < 1.3 , blaze-markup >= 0.7 && < 0.9 , blaze-html >= 0.8 && < 0.10- , text >= 1.0 && < 1.3+ , text >= 1.2 && < 1.3 default-language: Haskell2010 test-suite test
src/Text/Blaze/Colonnade.hs view
@@ -1,6 +1,6 @@+{-# LANGUAGE BangPatterns #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE BangPatterns #-} -- | Build HTML tables using @blaze-html@ and @colonnade@. The bottom -- of this page has a tutorial that walks through a full example,@@ -54,7 +54,8 @@ import Colonnade (Colonnade,Headed,Headless,Fascia,Cornice) import Data.Text (Text) import Control.Monad-import Data.Monoid+import Data.Semigroup+import Data.Monoid hiding ((<>)) import Data.Foldable import Data.String (IsString(..)) import Data.Maybe (listToMaybe)@@ -267,9 +268,12 @@ instance IsString Cell where fromString = stringCell +instance Semigroup Cell where+ (Cell a1 c1) <> (Cell a2 c2) = Cell (a1 <> a2) (c1 <> c2)+ instance Monoid Cell where mempty = Cell mempty mempty- mappend (Cell a1 c1) (Cell a2 c2) = Cell (mappend a1 a2) (mappend c1 c2)+ mappend = (<>) -- | Create a 'Cell' from a 'Widget' htmlCell :: Html -> Cell