packages feed

rainbox 0.18.0.10 → 0.20.0.0

raw patch · 6 files changed

+170/−154 lines, 6 filesdep ~QuickCheckdep ~basedep ~bytestring

Dependency ranges changed: QuickCheck, base, bytestring, containers, lens-simple, rainbow, tasty, tasty-quickcheck, text

Files

README.md view
@@ -22,29 +22,6 @@ [Rainbow](http://hackage.haskell.org/package/rainbow) which is only tested on UNIX-like systems. -Tests-=====--You can simply use "cabal test".  However, I recommend that you do:--    cabal configure --enable-tests-    cabal build-    dist/build/rainbox-properties/rainbox-properties-    dist/build/rainbox-visual/rainbox-visual--The last test, `rainbox-visual`, relies on you to examine the output-and make sure it looks correct.--Tests are also run on Travis:--[![Build Status](https://travis-ci.org/massysett/rainbox.svg?branch=master)](https://travis-ci.org/massysett/rainbox)--and although you can see the output of `rainbox-visual` there, it's-not formatted quite right on Travis.--At this time, Rainbox is verified to work with GHC versions in the 7.8 series-and the 7.10 series.- License ======= 
changelog view
@@ -1,19 +1,3 @@-0.12.0.0--  * rewrote API to use monoids--0.6.0.0--  * update to work with newer version of Rainbow--0.4.0.2--  * lower array dependendy to 0.4.0.0; this is the version that shipped-    with GHC 7.4.1--0.4.0.0--  * update for newer version of rainbow, where each Chunk has a list of Text-  rather than a single Text+v0.20.0.0 -  * test with GHC 7.8.2+* Made updates to monoid for base-4.11
lib/Rainbox/Core.hs view
@@ -35,16 +35,18 @@ data Alignment a = Center | NonCenter a   deriving (Eq, Ord, Show, Functor, F.Foldable, T.Traversable) +instance Semigroup (Alignment a) where+  x <> y = case x of+    Center -> y+    NonCenter a -> case y of+      Center -> NonCenter a+      NonCenter b -> NonCenter b+ -- | 'mempty' is 'center'.  'mappend' takes the rightmost non-'center' -- value.  instance Monoid (Alignment a) where   mempty = Center-  mappend x y = case x of-    Center -> y-    NonCenter a -> case y of-      Center -> NonCenter a-      NonCenter b -> NonCenter b  -- # Horizontal and vertical @@ -342,9 +344,11 @@ newtype Box a = Box (Seq (Payload a))   deriving (Eq, Ord, Show) +instance Semigroup (Box a) where+  (Box x) <> (Box y) = Box (x <> y)+ instance Monoid (Box a) where   mempty = Box Seq.empty-  mappend (Box x) (Box y) = Box (x <> y)  -- # Orientation @@ -519,14 +523,8 @@  makeLenses ''Cell --- | 'mappend' combines two 'Cell' horizontally so they are--- side-by-side, left-to-right.  The '_horizontal', '_vertical', and--- '_background' fields are combined using their respective 'Monoid'--- instances.  'mempty' uses the respective 'mempty' value for each--- field.-instance Monoid Cell where-  mempty = Cell mempty mempty mempty mempty-  mappend (Cell rx hx vx bx) (Cell ry hy vy by)+instance Semigroup Cell where+  (Cell rx hx vx bx) <> (Cell ry hy vy by)     = Cell (zipSeqs rx ry) (hx <> hy) (vx <> vy) (bx <> by)     where       zipSeqs x y = Seq.zipWith (<>) x' y'@@ -535,6 +533,15 @@             (max 0 (Seq.length y - Seq.length x)) Seq.empty           y' = y <> Seq.replicate             (max 0 (Seq.length x - Seq.length y)) Seq.empty+++-- | 'mappend' combines two 'Cell' horizontally so they are+-- side-by-side, left-to-right.  The '_horizontal', '_vertical', and+-- '_background' fields are combined using their respective 'Monoid'+-- instances.  'mempty' uses the respective 'mempty' value for each+-- field.+instance Monoid Cell where+  mempty = Cell mempty mempty mempty mempty  -- | Creates a blank 'Cell' with the given background color and width; -- useful for adding separators between columns.
+ package.yaml view
@@ -0,0 +1,56 @@+# hpack package description.+# See+# https://github.com/sol/hpack+name: rainbox+synopsis: Two-dimensional box pretty printing, with colors+description: Please see README.md+version: 0.20.0.0+license: BSD3+license-file: LICENSE+copyright: Copyright 2014-2018 Omari Norman+author: Omari Norman+maintainer: omari@smileystation.com+stability: Experimental+homepage: https://www.github.com/massysett/rainbox+bug-reports: https://www.github.com/massysett/rainbox/issues+category: System+extra-source-files:+  - README.md+  - package.yaml+  - stack.yaml+  - changelog+verbatim:+  x-curation: uncurated++dependencies:+  - base >= 4.11 && < 5+  - text+  - bytestring+  - containers+  - rainbow+  - text+  - lens-simple++ghc-options: -Wall+other-extensions: TemplateHaskell+source-dirs: lib+github: massysett/rainbox++library: {}++tests:+  rainbox-properties:+    main: rainbox-properties.hs+    source-dirs: test+    dependencies:+      - QuickCheck+      - tasty+      - tasty-quickcheck+  rainbox-visual:+    main: rainbox-visual.hs+    source-dirs: test+    dependencies:+      - QuickCheck+      - tasty+      - tasty-quickcheck+
rainbox.cabal view
@@ -1,114 +1,105 @@--- This Cabal file generated using the Cartel library.--- Cartel is available at:--- http://www.github.com/massysett/cartel+-- This file has been generated from package.yaml by hpack version 0.28.2. ----- Script name used to generate: genCabal.hs--- Generated on: 2016-07-09 15:08:49.696348 EDT--- Cartel library version: 0.14.2.8+-- see: https://github.com/sol/hpack+--+-- hash: e4724dda2fa0f95c6ca7152f93acd56e5fb19e8d2153a9ec3500397b7139e5e4 -name: rainbox-version: 0.18.0.10-cabal-version: >= 1.18-license: BSD3-license-file: LICENSE-build-type: Simple-copyright: Copyright 2014-2016 Omari Norman-author: Omari Norman-maintainer: omari@smileystation.com-stability: Experimental-homepage: http://www.github.com/massysett/rainbox-bug-reports: http://www.github.com/massysett/rainbox/issues-synopsis: Two-dimensional box pretty printing, with colors-description:-  Prints boxes in two dimensions, with colors.  Boxes are-  automatically padded with necessary whitespace.-  .-  For more information, please see the Haddock documentation and-  .-  <http://www.github.com/massysett/rainbox>-category: Text-tested-with:-  GHC == 7.10.2+name:           rainbox+version:        0.20.0.0+synopsis:       Two-dimensional box pretty printing, with colors+description:    Please see README.md+category:       System+stability:      Experimental+homepage:       https://www.github.com/massysett/rainbox+bug-reports:    https://www.github.com/massysett/rainbox/issues+author:         Omari Norman+maintainer:     omari@smileystation.com+copyright:      Copyright 2014-2018 Omari Norman+license:        BSD3+license-file:   LICENSE+build-type:     Simple+cabal-version:  >= 1.10 extra-source-files:-  README.md-  changelog+    changelog+    package.yaml+    README.md+    stack.yaml+x-curation:     uncurated -Library+source-repository head+  type: git+  location: https://github.com/massysett/rainbox++library   exposed-modules:-    Rainbox-    Rainbox.Core-    Rainbox.Tutorial-  default-language: Haskell2010-  ghc-options:-    -Wall+      Rainbox+      Rainbox.Core+      Rainbox.Tutorial+  other-modules:+      Paths_rainbox   hs-source-dirs:-    lib+      lib+  other-extensions: TemplateHaskell+  ghc-options: -Wall   build-depends:-      base >= 4.8.0.0 && < 5-    , rainbow >= 0.26-    , bytestring >= 0.10-    , containers >= 0.5.5-    , text >= 0.11.3.1-    , lens-simple >= 0.1.0-  other-extensions:-    TemplateHaskell--source-repository head-  type: git-  location: https://github.com/massysett/rainbox.git+      base >=4.11 && <5+    , bytestring+    , containers+    , lens-simple+    , rainbow+    , text+  default-language: Haskell2010 -Test-Suite rainbox-properties+test-suite rainbox-properties+  type: exitcode-stdio-1.0   main-is: rainbox-properties.hs+  other-modules:+      Rainbox+      Rainbox.Core+      Rainbox.Tutorial+      Rainbow.Instances+      Rainbox.Instances+      Paths_rainbox+  hs-source-dirs:+      lib+      test+  other-extensions: TemplateHaskell+  ghc-options: -Wall   build-depends:-      base >= 4.8.0.0 && < 5-    , rainbow >= 0.26-    , bytestring >= 0.10-    , containers >= 0.5.5-    , text >= 0.11.3.1-    , lens-simple >= 0.1.0-    , tasty >= 0.10.1-    , tasty-quickcheck >= 0.8.1-    , QuickCheck >= 2.8.2-  ghc-options:-    -Wall+      QuickCheck+    , base >=4.11 && <5+    , bytestring+    , containers+    , lens-simple+    , rainbow+    , tasty+    , tasty-quickcheck+    , text   default-language: Haskell2010-  hs-source-dirs:-    lib-    test-  other-modules:-    Rainbox-    Rainbox.Core-    Rainbox.Tutorial-    Rainbow.Instances-    Rainbox.Instances-  type: exitcode-stdio-1.0-  other-extensions:-    TemplateHaskell -Test-Suite rainbox-visual+test-suite rainbox-visual+  type: exitcode-stdio-1.0   main-is: rainbox-visual.hs+  other-modules:+      Rainbox+      Rainbox.Core+      Rainbox.Tutorial+      Rainbow.Instances+      Rainbox.Instances+      Paths_rainbox+  hs-source-dirs:+      lib+      test+  other-extensions: TemplateHaskell+  ghc-options: -Wall   build-depends:-      base >= 4.8.0.0 && < 5-    , rainbow >= 0.26-    , bytestring >= 0.10-    , containers >= 0.5.5-    , text >= 0.11.3.1-    , lens-simple >= 0.1.0-    , tasty >= 0.10.1-    , tasty-quickcheck >= 0.8.1-    , QuickCheck >= 2.8.2-  ghc-options:-    -Wall+      QuickCheck+    , base >=4.11 && <5+    , bytestring+    , containers+    , lens-simple+    , rainbow+    , tasty+    , tasty-quickcheck+    , text   default-language: Haskell2010-  hs-source-dirs:-    lib-    test-  other-modules:-    Rainbox-    Rainbox.Core-    Rainbox.Tutorial-    Rainbow.Instances-    Rainbox.Instances-  type: exitcode-stdio-1.0-  other-extensions:-    TemplateHaskell
+ stack.yaml view
@@ -0,0 +1,1 @@+resolver: nightly-2018-05-25