context-free-art 0.2.0.0 → 0.2.0.1
raw patch · 6 files changed
+8/−10 lines, 6 filesdep −extradep ~HUnitdep ~basedep ~bifunctorsPVP ok
version bump matches the API change (PVP)
Dependencies removed: extra
Dependency ranges changed: HUnit, base, bifunctors, blaze-svg, random, text, text-show
API changes (from Hackage documentation)
Files
- Art/ContextFree.hs +0/−1
- Art/Geometry.hs +3/−1
- Art/Interpreter.hs +4/−2
- Art/Util.hs +0/−1
- Tests.hs +0/−1
- context-free-art.cabal +1/−4
Art/ContextFree.hs view
@@ -19,5 +19,4 @@ import Art.Grammar import Art.Interpreter-import Art.Util import Art.Geometry
Art/Geometry.hs view
@@ -1,11 +1,13 @@ module Art.Geometry where import Control.Arrow-import Data.Tuple.Extra import Data.Biapplicative -- | A vector in 2d euclidian space. type Vec = (Float, Float)++both :: (a -> b) -> (a, a) -> (b, b)+both f (a, b) = (f a, f b) addVecs :: Vec -> Vec -> Vec addVecs = biliftA2 (+) (+)
Art/Interpreter.hs view
@@ -7,7 +7,6 @@ import TextShow import Data.List import Data.List.NonEmpty hiding (reverse)-import Data.Tuple.Extra import Data.Functor import Data.Function import Data.Maybe@@ -108,6 +107,9 @@ True -> interpretSymbol state sym False -> pure emptyRes +second :: (a -> b) -> (c, a) -> (c, b)+second f (a, b) = (a, f b)+ interpretSymbol :: State -> Symbol -> IO Res interpretSymbol state@State{ position = pos, scale = scale } = \case@@ -140,4 +142,4 @@ finalise <$> interpretSymbol emptyState sym where finalise :: Res -> S.Svg- finalise (Just bounds, svg) = toSVG (boundsToViewBox bounds) svg+ finalise (bounds, svg) = toSVG (boundsToViewBox (fromMaybe (0, 0, 0, 0) bounds)) svg
Art/Util.hs view
@@ -2,7 +2,6 @@ module Art.Util where -import Data.Tuple.Extra import qualified Data.Text as T import TextShow import Art.Geometry
Tests.hs view
@@ -3,7 +3,6 @@ import Data.List import Data.List.NonEmpty import Test.HUnit hiding (path)-import Data.Tuple.Extra import Text.Blaze import Text.Blaze.Svg11 ((!)) import qualified Text.Blaze.Svg11 as S
context-free-art.cabal view
@@ -4,12 +4,11 @@ -- http://haskell.org/cabal/users-guide/ name: context-free-art-version: 0.2.0.0+version: 0.2.0.1 synopsis: Generate art from context-free grammars description: . Create art via context free grammar production rules.- Includes an SVG backend. . == Context free grammar primer .@@ -61,7 +60,6 @@ , blaze-svg ^>= 0.3.6 , random ^>= 1.1 , blaze-markup- , extra ^>= 1.6 , bifunctors ^>= 5.5 , text-show ^>= 3.8 , text ^>= 1.2@@ -78,7 +76,6 @@ , blaze-svg ^>= 0.3.6 , random ^>= 1.1 , blaze-markup- , extra ^>= 1.6 , bifunctors ^>= 5.5 , text-show ^>= 3.8 , text ^>= 1.2