colorful-monoids 0.2.1.0 → 0.2.1.1
raw patch · 2 files changed
+24/−18 lines, 2 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Data.Monoid.Colorful: infixr 6 <>
+ Data.Monoid.Colorful.Flat: infixr 6 <>
Files
- colorful-monoids.cabal +19/−15
- src/Data/Monoid/Colorful/Nested.hs +5/−3
colorful-monoids.cabal view
@@ -1,21 +1,23 @@--- This file has been generated from package.yaml by hpack version 0.15.0.+-- This file has been generated from package.yaml by hpack version 0.28.2. -- -- see: https://github.com/sol/hpack+--+-- hash: e15e55fee2ffbcab50bb30e2a6fa142c105abb9f985135497f3b3a5100981732 name: colorful-monoids-version: 0.2.1.0+version: 0.2.1.1 synopsis: Styled console text output using ANSI escape sequences.-description: Styled console text output using ANSI escape sequences.+description: This library provides styled text output using ANSI escape sequences. The colored text is modeled as nested Colored values, which form a Monoid. As a result the colored code has a relatively concise form. category: Text, User Interfaces, Monad stability: experimental homepage: https://github.com/minad/colorful-monoids#readme bug-reports: https://github.com/minad/colorful-monoids/issues author: Daniel Mendler <mail@daniel-mendler.de> maintainer: Daniel Mendler <mail@daniel-mendler.de>-copyright: 2017 Daniel Mendler+copyright: 2017-2018 Daniel Mendler license: MIT license-file: LICENSE-tested-with: GHC == 7.10.3, GHC == 8.0.1+tested-with: GHC == 7.10.3, GHC == 8.0.1, GHC == 8.4.2 build-type: Simple cabal-version: >= 1.10 @@ -24,14 +26,6 @@ location: https://github.com/minad/colorful-monoids library- hs-source-dirs:- src- ghc-options: -Wall- build-depends:- base >= 4.8 && < 5- if impl(ghc < 8.0)- build-depends:- semigroups >= 0.9 && < 1 exposed-modules: Data.Monoid.Colorful Data.Monoid.Colorful.Flat@@ -43,16 +37,26 @@ Data.Monoid.Colorful.Term Data.Monoid.Colorful.Trustworthy Paths_colorful_monoids+ hs-source-dirs:+ src+ ghc-options: -Wall+ build-depends:+ base >=4.8 && <5+ if impl(ghc < 8.0)+ build-depends:+ semigroups >=0.9 && <1 default-language: Haskell2010 test-suite example type: exitcode-stdio-1.0 main-is: example.hs+ other-modules:+ Paths_colorful_monoids ghc-options: -Wall build-depends:- base >= 4.8 && < 5+ base >=4.8 && <5 , colorful-monoids if impl(ghc < 8.0) build-depends:- semigroups >= 0.9 && < 1+ semigroups >=0.9 && <1 default-language: Haskell2010
src/Data/Monoid/Colorful/Nested.hs view
@@ -28,7 +28,7 @@ import Data.Monoid.Colorful.SGR import Data.Monoid.Colorful.Trustworthy import Data.String (IsString(..))-import Data.Semigroup (Semigroup)+import qualified Data.Semigroup as Sem import GHC.Generics (Generic, Generic1) import qualified Data.Monoid.Colorful.Flat as Flat import Control.Monad (ap)@@ -59,10 +59,12 @@ Bg a x >>= f = Bg a (x >>= f) Pair x y >>= f = Pair (x >>= f) (y >>= f) -instance Semigroup (Colored a)+instance Sem.Semigroup (Colored a) where+ (<>) = Pair+ instance Monoid (Colored a) where mempty = Nil- mappend = Pair+ mappend = (Sem.<>) instance IsString a => IsString (Colored a) where fromString = Value . fromString