rainbow 0.28.0.2 → 0.28.0.4
raw patch · 3 files changed
+14/−19 lines, 3 filesdep +lens-simpledep −microlensdep −microlens-thPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: lens-simple
Dependencies removed: microlens, microlens-th
API changes (from Hackage documentation)
- Rainbow.Types: back :: forall a_aaO9. Lens' (Style a_aaO9) (Color a_aaO9)
+ Rainbow.Types: back :: Functor f => (Color a -> f (Color a)) -> Style a -> f (Style a)
- Rainbow.Types: blink :: Lens' Format Bool
+ Rainbow.Types: blink :: Functor f => (Bool -> f Bool) -> Format -> f Format
- Rainbow.Types: bold :: Lens' Format Bool
+ Rainbow.Types: bold :: Functor f => (Bool -> f Bool) -> Format -> f Format
- Rainbow.Types: color256 :: Lens' Radiant (Color Word8)
+ Rainbow.Types: color256 :: Functor f => (Color Word8 -> f (Color Word8)) -> Radiant -> f Radiant
- Rainbow.Types: color8 :: Lens' Radiant (Color Enum8)
+ Rainbow.Types: color8 :: Functor f => (Color Enum8 -> f (Color Enum8)) -> Radiant -> f Radiant
- Rainbow.Types: faint :: Lens' Format Bool
+ Rainbow.Types: faint :: Functor f => (Bool -> f Bool) -> Format -> f Format
- Rainbow.Types: fore :: forall a_aaO9. Lens' (Style a_aaO9) (Color a_aaO9)
+ Rainbow.Types: fore :: Functor f => (Color a -> f (Color a)) -> Style a -> f (Style a)
- Rainbow.Types: format :: forall a_aaO9. Lens' (Style a_aaO9) Format
+ Rainbow.Types: format :: Functor f => (Format -> f Format) -> Style a -> f (Style a)
- Rainbow.Types: inverse :: Lens' Format Bool
+ Rainbow.Types: inverse :: Functor f => (Bool -> f Bool) -> Format -> f Format
- Rainbow.Types: invisible :: Lens' Format Bool
+ Rainbow.Types: invisible :: Functor f => (Bool -> f Bool) -> Format -> f Format
- Rainbow.Types: italic :: Lens' Format Bool
+ Rainbow.Types: italic :: Functor f => (Bool -> f Bool) -> Format -> f Format
- Rainbow.Types: scheme :: forall a_abiL. Lens' (Chunk a_abiL) Scheme
+ Rainbow.Types: scheme :: Functor f => (Scheme -> f Scheme) -> Chunk a -> f (Chunk a)
- Rainbow.Types: strikeout :: Lens' Format Bool
+ Rainbow.Types: strikeout :: Functor f => (Bool -> f Bool) -> Format -> f Format
- Rainbow.Types: style256 :: Lens' Scheme (Style Word8)
+ Rainbow.Types: style256 :: Functor f => (Style Word8 -> f (Style Word8)) -> Scheme -> f Scheme
- Rainbow.Types: style8 :: Lens' Scheme (Style Enum8)
+ Rainbow.Types: style8 :: Functor f => (Style Enum8 -> f (Style Enum8)) -> Scheme -> f Scheme
- Rainbow.Types: underline :: Lens' Format Bool
+ Rainbow.Types: underline :: Functor f => (Bool -> f Bool) -> Format -> f Format
- Rainbow.Types: yarn :: forall a_abiL a_absg. Lens (Chunk a_abiL) (Chunk a_absg) a_abiL a_absg
+ Rainbow.Types: yarn :: Functor f => (t -> f a) -> Chunk t -> f (Chunk a)
Files
- lib/Rainbow.hs +4/−6
- lib/Rainbow/Types.hs +3/−1
- rainbow.cabal +7/−12
lib/Rainbow.hs view
@@ -169,11 +169,11 @@ import Data.Word (Word8) import Data.ByteString (ByteString) import Data.Function ((&))-import qualified Lens.Micro as Lens-import Lens.Micro ((.~))+import qualified Lens.Simple as Lens+import Lens.Simple ((.~)) import Data.Monoid (Monoid(mempty), (<>)) -formatBoth :: Lens.ASetter' Y.Format Bool -> Y.Chunk a -> Y.Chunk a+formatBoth :: Lens.Setter' Y.Format Bool -> Y.Chunk a -> Y.Chunk a formatBoth get c = c & Y.scheme . Y.style8 . Y.format . get .~ True & Y.scheme . Y.style256 . Y.format . get .~ True @@ -229,9 +229,7 @@ -- 'fore' ('blue' <> 'only256' 'red') -- @ only256 :: Y.Radiant -> Y.Radiant-only256 r = r & Y.color8 . wrapped .~ Nothing- where- wrapped = Lens.sets (\f (Y.Color m) -> Y.Color (f m))+only256 (Y.Radiant _ c256) = Y.Radiant mempty c256 black :: Y.Radiant black = Y.Radiant (Y.Color (Just Y.E0)) (Y.Color (Just 0))
lib/Rainbow/Types.hs view
@@ -1,5 +1,7 @@ {-# LANGUAGE DeriveGeneric, DeriveDataTypeable, DeriveFunctor, DeriveTraversable, DeriveFoldable, TemplateHaskell #-}+-- Lens.Simple makeLenses will not create signatures+{-# OPTIONS_GHC -fno-warn-missing-signatures #-} -- | All the main types in Rainbow. Using this module you can specify -- that you want different formatting for 8- and 256-color terminals.@@ -10,7 +12,7 @@ -- # Imports -import Lens.Micro.TH (makeLenses)+import Lens.Simple (makeLenses) import Data.Monoid ((<>)) import Data.Traversable () import Data.Typeable (Typeable)
rainbow.cabal view
@@ -3,11 +3,11 @@ -- http://www.github.com/massysett/cartel -- -- Script name used to generate: genCabal.hs--- Generated on: 2016-06-18 08:40:56.083393 EDT+-- Generated on: 2016-07-09 14:40:38.307841 EDT -- Cartel library version: 0.14.2.8 name: rainbow-version: 0.28.0.2+version: 0.28.0.4 cabal-version: >= 1.10 license: BSD3 license-file: LICENSE@@ -43,8 +43,7 @@ , text >= 0.11.2.0 , bytestring >= 0.10 , process >= 1.2- , microlens >= 0.4.2.1- , microlens-th >= 0.3.0.2+ , lens-simple >= 0.1.0 hs-source-dirs: lib @@ -74,8 +73,7 @@ , text >= 0.11.2.0 , bytestring >= 0.10 , process >= 1.2- , microlens >= 0.4.2.1- , microlens-th >= 0.3.0.2+ , lens-simple >= 0.1.0 hs-source-dirs: lib @@ -98,8 +96,7 @@ , text >= 0.11.2.0 , bytestring >= 0.10 , process >= 1.2- , microlens >= 0.4.2.1- , microlens-th >= 0.3.0.2+ , lens-simple >= 0.1.0 hs-source-dirs: lib @@ -122,8 +119,7 @@ , text >= 0.11.2.0 , bytestring >= 0.10 , process >= 1.2- , microlens >= 0.4.2.1- , microlens-th >= 0.3.0.2+ , lens-simple >= 0.1.0 hs-source-dirs: lib @@ -146,8 +142,7 @@ , text >= 0.11.2.0 , bytestring >= 0.10 , process >= 1.2- , microlens >= 0.4.2.1- , microlens-th >= 0.3.0.2+ , lens-simple >= 0.1.0 hs-source-dirs: lib