packages feed

diagrams-braille 0.1.0.2 → 0.1.1

raw patch · 3 files changed

+23/−24 lines, 3 filesdep ~Rasterificdep ~diagrams-corenew-uploaderPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: Rasterific, diagrams-core

API changes (from Hackage documentation)

+ Diagrams.Backend.Braille: data family Options b (v :: Type -> Type) n
+ Diagrams.Backend.Braille: instance GHC.Classes.Eq n => GHC.Classes.Eq (Diagrams.Core.Types.Options Diagrams.Backend.Braille.Braille Linear.V2.V2 n)

Files

app/Main.hs view
@@ -34,13 +34,13 @@   where hilbert' = rotateBy (1/4) . hilbert  newtype Opts = Opts { draw :: Diagram B }-instance Parseable Opts where parser = Opts . mconcat <$> commands+instance Parseable Opts where parser = Opts . mconcat <$> some diagram -commands :: ( TypeableFloat n, Enum n, Read n-            , Renderable (Text n) b, Renderable (Path V2 n) b-            )-         => Parser [QDiagram b V2 n Any]-commands = some $ hsubparser $ mconcat [+diagram :: ( TypeableFloat n, Enum n, Read n+           , Renderable (Text n) b, Renderable (Path V2 n) b+           )+        => Parser (QDiagram b V2 n Any)+diagram = hsubparser $ mconcat [     commandGroup "Diagrams"   , cmd "strut" "A diagram which produces no output, but with respect to alignment and envelope acts like a 1-dimensional segment oriented along the vector denoted by vx and vy, with local origin at its center." $     (\x y -> strut (V2 x y)) <$> arg (metavar "vx") <*> arg (metavar "vy")
diagrams-braille.cabal view
@@ -1,11 +1,11 @@--- This file has been generated from package.yaml by hpack version 0.28.2.+cabal-version: 1.12++-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack------ hash: 96caba720e58cac73984f3fcda9daadf5ea39d885b5711eb94e9e14dd30a1edb  name:           diagrams-braille-version:        0.1.0.2+version:        0.1.1 synopsis:       Braille diagrams with plain text description:    Please see the README at <https://github.com/mlang/diagrams-braille#readme> category:       Graphics@@ -17,7 +17,6 @@ license:        BSD3 license-file:   LICENSE build-type:     Simple-cabal-version:  >= 1.10 extra-source-files:     README.md @@ -35,12 +34,12 @@       src   build-depends:       JuicyPixels-    , Rasterific+    , Rasterific >=0.7.4 && <0.8     , base >=4.7 && <5     , containers-    , diagrams-core >=1.4 && <1.5-    , diagrams-lib >=1.4 && <1.5-    , diagrams-rasterific >=1.4 && <1.5+    , diagrams-core >=1.4 && <1.6+    , diagrams-lib ==1.4.*+    , diagrams-rasterific ==1.4.*     , filepath     , hashable     , lens@@ -58,13 +57,13 @@   ghc-options: -threaded -rtsopts -with-rtsopts=-N   build-depends:       JuicyPixels-    , Rasterific+    , Rasterific >=0.7.4 && <0.8     , base >=4.7 && <5     , containers     , diagrams-braille-    , diagrams-core >=1.4 && <1.5-    , diagrams-lib >=1.4 && <1.5-    , diagrams-rasterific >=1.4 && <1.5+    , diagrams-core >=1.4 && <1.6+    , diagrams-lib ==1.4.*+    , diagrams-rasterific ==1.4.*     , filepath     , hashable     , lens
src/Diagrams/Backend/Braille.hs view
@@ -133,7 +133,7 @@   type Result Braille V2 n = String   data Options Braille V2 n = BrailleOptions           { _sizeSpec  :: SizeSpec V2 n -- ^ The requested size of the output-          } deriving Show+          } deriving (Show, Eq)    renderRTree _ opts t =     foldr drawText (img2brl $ R.renderDrawing (round w) (round h) bgColor r) txt@@ -158,10 +158,10 @@ runR (R r) = r  instance Semigroup (Render Braille V2 n) where-  R rd1 <> R rd2 = R (rd1 >> rd2)+  R rd1 <> R rd2 = R $ rd1 >> rd2  instance Monoid (Render Braille V2 n) where-  mempty = R $ return ()+  mempty = R $ pure ()  instance Hashable n => Hashable (Options Braille V2 n) where   hashWithSalt s (BrailleOptions sz) = s `hashWithSalt` sz@@ -290,8 +290,8 @@ mkStroke :: TypeableFloat n => n ->  R.Join -> (R.Cap, R.Cap) -> Maybe (R.DashPattern, n)       -> [[R.Primitive]] -> R.Drawing PixelRGBA8 () mkStroke (realToFrac -> l) j c d primList =-  maybe (mapM_ (R.stroke l j c) primList)-        (\(dsh, off) -> mapM_ (R.dashedStrokeWithOffset (realToFrac off) dsh l j c) primList)+  maybe (R.stroke l j c $ concat primList)+        (\(dsh, off) -> R.dashedStrokeWithOffset (realToFrac off) dsh l j c $ concat primList)         d  instance TypeableFloat n => Renderable (Path V2 n) Braille where