diagrams-lib 1.2.0.1 → 1.2.0.2
raw patch · 4 files changed
+18/−25 lines, 4 filesdep ~lens
Dependency ranges changed: lens
Files
- CHANGES.markdown +5/−0
- diagrams-lib.cabal +2/−2
- src/Diagrams/Combinators.hs +3/−11
- src/Diagrams/Parametric/Adjust.hs +8/−12
CHANGES.markdown view
@@ -1,3 +1,8 @@+1.2.0.2 (22 August 2014)+------------------------++- Allow lens-4.4+ 1.2.0.1 (4 June 2014) ---------------------
diagrams-lib.cabal view
@@ -1,5 +1,5 @@ Name: diagrams-lib-Version: 1.2.0.1+Version: 1.2.0.2 Synopsis: Embedded domain-specific language for declarative graphics Description: Diagrams is a flexible, extensible EDSL for creating graphics of many types. Graphics can be created@@ -105,7 +105,7 @@ data-default-class < 0.1, fingertree >= 0.1 && < 0.2, intervals >= 0.7 && < 0.8,- lens >= 4.0 && < 4.3,+ lens >= 4.0 && < 4.5, tagged >= 0.7, optparse-applicative >= 0.7 && < 0.10, filepath,
src/Diagrams/Combinators.hs view
@@ -313,7 +313,7 @@ -- | Options for 'cat''. data CatOpts v = CatOpts { _catMethod :: CatMethod , _sep :: Scalar v- , _catOptsvProxy__ :: Proxy v+ , catOptsvProxy__ :: Proxy v } -- The reason the proxy field is necessary is that without it,@@ -328,15 +328,7 @@ -- more restricted. makeLensesWith- ( lensRules- -- don't make a lens for the proxy field- & lensField .~ (\label ->- case label of- "_catOptsvProxy__" -> Nothing- _ -> Just (drop 1 label)- )- & generateSignatures .~ False- )+ ( lensRules & generateSignatures .~ False) ''CatOpts -- | Which 'CatMethod' should be used:@@ -352,7 +344,7 @@ instance Num (Scalar v) => Default (CatOpts v) where def = CatOpts { _catMethod = Cat , _sep = 0- , _catOptsvProxy__ = Proxy+ , catOptsvProxy__ = Proxy } -- | @cat v@ positions a list of objects so that their local origins
src/Diagrams/Parametric/Adjust.hs view
@@ -20,7 +20,7 @@ ) where -import Control.Lens (makeLensesWith, lensRules, lensField, generateSignatures, (^.), (&), (.~), Lens')+import Control.Lens (makeLensesWith, lensRules, generateSignatures, (^.), (&), (.~), Lens') import Data.Proxy import Data.Default.Class@@ -48,19 +48,11 @@ data AdjustOpts v = AO { _adjMethod :: AdjustMethod v , _adjSide :: AdjustSide , _adjEps :: Scalar v- , _adjOptsvProxy__ :: Proxy v+ , adjOptsvProxy__ :: Proxy v } makeLensesWith- ( lensRules- -- don't make a lens for the proxy field- & lensField .~ (\label ->- case label of- "_adjOptsvProxy__" -> Nothing- _ -> Just (drop 1 label)- )- & generateSignatures .~ False- )+ ( lensRules & generateSignatures .~ False) ''AdjustOpts -- | Which method should be used for adjusting?@@ -79,7 +71,11 @@ def = Both instance Fractional (Scalar v) => Default (AdjustOpts v) where- def = AO def def stdTolerance Proxy+ def = AO { _adjMethod = def+ , _adjSide = def+ , _adjEps = stdTolerance+ , adjOptsvProxy__ = Proxy+ } -- | Adjust the length of a parametric object such as a segment or -- trail. The second parameter is an option record which controls how