packages feed

hformat 0.3.1.0 → 0.3.2.0

raw patch · 3 files changed

+5/−3 lines, 3 filesdep ~basesetup-changedPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

+ Text.Format: instance Data.Semigroup.Semigroup Text.Format.Formatted
- Text.Format: class Formattable a where formattable x _ = fromString ∘ show $ x
+ Text.Format: class Formattable a

Files

− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
hformat.cabal view
@@ -1,5 +1,5 @@ name:                hformat
-version:             0.3.1.0
+version:             0.3.2.0
 synopsis:            Simple Haskell formatting
 description: String formatting
 homepage:            http://github.com/mvoidex/hformat
src/Text/Format.hs view
@@ -28,6 +28,7 @@ import Data.Char (intToDigit)
 import Data.List (find, intercalate, nub)
 import Data.Maybe (fromMaybe, listToMaybe)
+import Data.Semigroup (Semigroup(..))
 import qualified Data.Text as T
 import Data.Text.Lazy (Text, unpack)
 import Data.String
@@ -49,6 +50,9 @@ 
 instance IsString Formatted where
 	fromString = Formatted ∘ return ∘ fromString
+
+instance Semigroup Formatted where
+	Formatted l <> Formatted r = Formatted $ l ++ r
 
 instance Monoid Formatted where
 	mempty = Formatted []