packages feed

diagrams-lib 1.4.1.2 → 1.4.2

raw patch · 7 files changed

+71/−11 lines, 7 filesdep ~tastydep ~tasty-hunitPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: tasty, tasty-hunit

API changes (from Hackage documentation)

- Diagrams.Align: instance (Diagrams.Core.V.V b ~ v, Diagrams.Core.V.N b ~ n, Linear.Metric.Metric v, Diagrams.Core.Envelope.OrderedField n, Diagrams.Align.Alignable b) => Diagrams.Align.Alignable (Data.Map.Base.Map k b)
- Diagrams.Align: instance (Diagrams.Core.V.V b ~ v, Diagrams.Core.V.N b ~ n, Linear.Metric.Metric v, Diagrams.Core.Envelope.OrderedField n, Diagrams.Align.Alignable b) => Diagrams.Align.Alignable (Data.Set.Base.Set b)
- Diagrams.Coordinates: data (:&) a b
- Diagrams.TwoD.Path: instance Control.Lens.Wrapped.Wrapped (Diagrams.TwoD.Path.Clip n0)
- Diagrams.TwoD.Path: instance Diagrams.TwoD.Path.Clip n0 ~ t0 => Control.Lens.Wrapped.Rewrapped (Diagrams.TwoD.Path.Clip n1) t0
+ Diagrams.Align: instance (Diagrams.Core.V.V b ~ v, Diagrams.Core.V.N b ~ n, Linear.Metric.Metric v, Diagrams.Core.Envelope.OrderedField n, Diagrams.Align.Alignable b) => Diagrams.Align.Alignable (Data.Map.Internal.Map k b)
+ Diagrams.Align: instance (Diagrams.Core.V.V b ~ v, Diagrams.Core.V.N b ~ n, Linear.Metric.Metric v, Diagrams.Core.Envelope.OrderedField n, Diagrams.Align.Alignable b) => Diagrams.Align.Alignable (Data.Set.Internal.Set b)
+ Diagrams.BoundingBox: boxGrid :: (Traversable v, Additive v, Num n, Enum n) => n -> BoundingBox v n -> [Point v n]
+ Diagrams.Coordinates: data a (:&) b
+ Diagrams.TwoD: scaleRotateTo :: (InSpace V2 n t, Transformable t, Floating n) => V2 n -> t -> t
+ Diagrams.TwoD: scalingRotationTo :: (Floating n) => V2 n -> T2 n
+ Diagrams.TwoD.Path: instance Control.Lens.Wrapped.Wrapped (Diagrams.TwoD.Path.Clip n)
+ Diagrams.TwoD.Path: instance Diagrams.TwoD.Path.Clip n1 ~ t => Control.Lens.Wrapped.Rewrapped (Diagrams.TwoD.Path.Clip n2) t
+ Diagrams.TwoD.Transform: scaleRotateTo :: (InSpace V2 n t, Transformable t, Floating n) => V2 n -> t -> t
+ Diagrams.TwoD.Transform: scalingRotationTo :: (Floating n) => V2 n -> T2 n
- Diagrams.Align: class Alignable a where alignBy' = alignBy'Default alignBy = alignBy' defaultBoundary
+ Diagrams.Align: class Alignable a
- Diagrams.Attributes.Compile: class (AttributeClass (AttrType code), Typeable (PrimType code)) => SplitAttribute code where type AttrType code :: * type PrimType code :: * where {
+ Diagrams.Attributes.Compile: class (AttributeClass (AttrType code), Typeable (PrimType code)) => SplitAttribute code where {
- Diagrams.Backend.CmdLine: class Mainable d where type MainOpts d :: * mainArgs _ = defaultOpts parser mainWith d = do { opts <- mainArgs d; mainRender opts d } where {
+ Diagrams.Backend.CmdLine: class Mainable d where {
- Diagrams.Backend.CmdLine: class ToResult d where type Args d :: * type ResultOf d :: * where {
+ Diagrams.Backend.CmdLine: class ToResult d where {
- Diagrams.Coordinates: class Coordinates c where type FinalCoord c :: * type PrevDim c :: * type Decomposition c :: * pr = (^&) where {
+ Diagrams.Coordinates: class Coordinates c where {
- Diagrams.Envelope: class (Metric (V a), OrderedField (N a)) => Enveloped a
+ Diagrams.Envelope: class (Metric V a, OrderedField N a) => Enveloped a
- Diagrams.Envelope: diameter :: ((~) (* -> *) (V a) v, (~) * (N a) n, Enveloped a) => v n -> a -> n
+ Diagrams.Envelope: diameter :: ((~) (* -> *) V a v, (~) * N a n, Enveloped a) => v n -> a -> n
- Diagrams.Envelope: envelope :: (OrderedField n, Metric v, Monoid' m) => Lens' (QDiagram b v n m) (Envelope v n)
+ Diagrams.Envelope: envelope :: (OrderedField n, Metric v, Monoid' m) => Lens' QDiagram b v n m Envelope v n
- Diagrams.Envelope: envelopeP :: ((~) (* -> *) (V a) v, (~) * (N a) n, Enveloped a) => v n -> a -> Point v n
+ Diagrams.Envelope: envelopeP :: ((~) (* -> *) V a v, (~) * N a n, Enveloped a) => v n -> a -> Point v n
- Diagrams.Envelope: envelopePMay :: ((~) (* -> *) (V a) v, (~) * (N a) n, Enveloped a) => v n -> a -> Maybe (Point v n)
+ Diagrams.Envelope: envelopePMay :: ((~) (* -> *) V a v, (~) * N a n, Enveloped a) => v n -> a -> Maybe Point v n
- Diagrams.Envelope: envelopeVMay :: Enveloped a => Vn a -> a -> Maybe (Vn a)
+ Diagrams.Envelope: envelopeVMay :: Enveloped a => Vn a -> a -> Maybe Vn a
- Diagrams.Envelope: radius :: ((~) (* -> *) (V a) v, (~) * (N a) n, Enveloped a) => v n -> a -> n
+ Diagrams.Envelope: radius :: ((~) (* -> *) V a v, (~) * N a n, Enveloped a) => v n -> a -> n
- Diagrams.LinearMap: class (LinearMappable a b, N a ~ N b) => AffineMappable a b where amap (AffineMap f _) = linmap f
+ Diagrams.LinearMap: class (LinearMappable a b, N a ~ N b) => AffineMappable a b
- Diagrams.Names: lookupName :: (IsName nm, Metric v, Semigroup m, OrderedField n) => nm -> QDiagram b v n m -> Maybe (Subdiagram b v n m)
+ Diagrams.Names: lookupName :: (IsName nm, Metric v, Semigroup m, OrderedField n) => nm -> QDiagram b v n m -> Maybe Subdiagram b v n m
- Diagrams.Names: mkSubdiagram :: QDiagram b v n m -> Subdiagram b v n m
+ Diagrams.Names: mkSubdiagram :: () => QDiagram b v n m -> Subdiagram b v n m
- Diagrams.Names: rawSub :: Subdiagram b v n m -> QDiagram b v n m
+ Diagrams.Names: rawSub :: () => Subdiagram b v n m -> QDiagram b v n m
- Diagrams.Parametric: class DomainBounds p where domainLower = const 0 domainUpper = const 1
+ Diagrams.Parametric: class DomainBounds p
- Diagrams.Parametric: class (Parametric p, DomainBounds p) => EndValues p where atStart x = x `atParam` domainLower x atEnd x = x `atParam` domainUpper x
+ Diagrams.Parametric: class (Parametric p, DomainBounds p) => EndValues p
- Diagrams.Parametric: class Parametric p => HasArcLength p where arcLength eps = midpoint . arcLengthBounded eps stdArcLength = arcLength stdTolerance stdArcLengthToParam = arcLengthToParam stdTolerance
+ Diagrams.Parametric: class Parametric p => HasArcLength p
- Diagrams.Parametric: class DomainBounds p => Sectionable p where splitAtParam x t = (section x (domainLower x) t, section x t (domainUpper x)) section x t1 t2 = snd (splitAtParam (fst (splitAtParam x t2)) (t1 / t2))
+ Diagrams.Parametric: class DomainBounds p => Sectionable p
- Diagrams.Points: _Point :: (Profunctor p, Functor f) => p (f a) (f (f a)) -> p (Point f a) (f (Point f a))
+ Diagrams.Points: _Point :: (Profunctor p, Functor f) => p f a f f a -> p Point f a f Point f a
- Diagrams.Points: lensP :: Functor f => (g a -> f (g a)) -> Point g a -> f (Point g a)
+ Diagrams.Points: lensP :: Functor f => (g a -> f g a) -> Point g a -> f Point g a
- Diagrams.Prelude: (*>) :: Applicative f => forall a b. f a -> f b -> f b
+ Diagrams.Prelude: (*>) :: Applicative f => forall a b. () => f a -> f b -> f b
- Diagrams.Prelude: (<$) :: Functor f => forall a b. a -> f b -> f a
+ Diagrams.Prelude: (<$) :: Functor f => forall a b. () => a -> f b -> f a
- Diagrams.Prelude: (<*) :: Applicative f => forall a b. f a -> f b -> f a
+ Diagrams.Prelude: (<*) :: Applicative f => forall a b. () => f a -> f b -> f a
- Diagrams.Prelude: infixl 4 <$>
+ Diagrams.Prelude: infixl 4 <$
- Diagrams.Prelude: liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
+ Diagrams.Prelude: liftA2 :: Applicative f => forall a b c. () => (a -> b -> c) -> f a -> f b -> f c
- Diagrams.Segment: oeEnvelope :: forall v_a1dPx n_a1dPy. Lens' (OffsetEnvelope v_a1dPx n_a1dPy) (Envelope v_a1dPx n_a1dPy)
+ Diagrams.Segment: oeEnvelope :: forall v_a1dnn n_a1dno. Lens' (OffsetEnvelope v_a1dnn n_a1dno) (Envelope v_a1dnn n_a1dno)
- Diagrams.Segment: oeOffset :: forall v_a1dPx n_a1dPy. Lens' (OffsetEnvelope v_a1dPx n_a1dPy) (TotalOffset v_a1dPx n_a1dPy)
+ Diagrams.Segment: oeOffset :: forall v_a1dnn n_a1dno. Lens' (OffsetEnvelope v_a1dnn n_a1dno) (TotalOffset v_a1dnn n_a1dno)
- Diagrams.ThreeD.Camera: horizontalFieldOfView :: forall n_aRy3. Lens' (PerspectiveLens n_aRy3) (Angle n_aRy3)
+ Diagrams.ThreeD.Camera: horizontalFieldOfView :: forall n_aZ7W. Lens' (PerspectiveLens n_aZ7W) (Angle n_aZ7W)
- Diagrams.ThreeD.Camera: orthoHeight :: forall n_aRAh. Lens' (OrthoLens n_aRAh) n_aRAh
+ Diagrams.ThreeD.Camera: orthoHeight :: forall n_aZaE. Lens' (OrthoLens n_aZaE) n_aZaE
- Diagrams.ThreeD.Camera: orthoWidth :: forall n_aRAh. Lens' (OrthoLens n_aRAh) n_aRAh
+ Diagrams.ThreeD.Camera: orthoWidth :: forall n_aZaE. Lens' (OrthoLens n_aZaE) n_aZaE
- Diagrams.ThreeD.Camera: verticalFieldOfView :: forall n_aRy3. Lens' (PerspectiveLens n_aRy3) (Angle n_aRy3)
+ Diagrams.ThreeD.Camera: verticalFieldOfView :: forall n_aZ7W. Lens' (PerspectiveLens n_aZ7W) (Angle n_aZ7W)
- Diagrams.ThreeD.Transform: translation :: v n -> Transformation v n
+ Diagrams.ThreeD.Transform: translation :: () => v n -> Transformation v n
- Diagrams.ThreeD.Types: V3 :: ~a -> ~a -> ~a -> V3 a
+ Diagrams.ThreeD.Types: V3 :: !a -> !a -> !a -> V3 a
- Diagrams.ThreeD.Types: _x :: (R1 t, Functor f) => (a -> f a) -> t a -> f (t a)
+ Diagrams.ThreeD.Types: _x :: (R1 t, Functor f) => (a -> f a) -> t a -> f t a
- Diagrams.ThreeD.Types: _xy :: (R2 t, Functor f) => (V2 a -> f (V2 a)) -> t a -> f (t a)
+ Diagrams.ThreeD.Types: _xy :: (R2 t, Functor f) => (V2 a -> f V2 a) -> t a -> f t a
- Diagrams.ThreeD.Types: _xyz :: (R3 t, Functor f) => (V3 a -> f (V3 a)) -> t a -> f (t a)
+ Diagrams.ThreeD.Types: _xyz :: (R3 t, Functor f) => (V3 a -> f V3 a) -> t a -> f t a
- Diagrams.ThreeD.Types: _y :: (R2 t, Functor f) => (a -> f a) -> t a -> f (t a)
+ Diagrams.ThreeD.Types: _y :: (R2 t, Functor f) => (a -> f a) -> t a -> f t a
- Diagrams.ThreeD.Types: _z :: (R3 t, Functor f) => (a -> f a) -> t a -> f (t a)
+ Diagrams.ThreeD.Types: _z :: (R3 t, Functor f) => (a -> f a) -> t a -> f t a
- Diagrams.Trace: class (Additive (V a), Ord (N a)) => Traced a
+ Diagrams.Trace: class (Additive V a, Ord N a) => Traced a
- Diagrams.Trace: maxTraceP :: ((~) * n (N a), Num n, Traced a) => Point (V a) n -> V a n -> a -> Maybe (Point (V a) n)
+ Diagrams.Trace: maxTraceP :: ((~) * n N a, Num n, Traced a) => Point V a n -> V a n -> a -> Maybe Point V a n
- Diagrams.Trace: maxTraceV :: ((~) * n (N a), Num n, Traced a) => Point (V a) n -> V a n -> a -> Maybe (V a n)
+ Diagrams.Trace: maxTraceV :: ((~) * n N a, Num n, Traced a) => Point V a n -> V a n -> a -> Maybe V a n
- Diagrams.Trace: trace :: (Metric v, OrderedField n, Semigroup m) => Lens' (QDiagram b v n m) (Trace v n)
+ Diagrams.Trace: trace :: (Metric v, OrderedField n, Semigroup m) => Lens' QDiagram b v n m Trace v n
- Diagrams.Trace: traceP :: ((~) * n (N a), Traced a, Num n) => Point (V a) n -> V a n -> a -> Maybe (Point (V a) n)
+ Diagrams.Trace: traceP :: ((~) * n N a, Traced a, Num n) => Point V a n -> V a n -> a -> Maybe Point V a n
- Diagrams.Trace: traceV :: ((~) * n (N a), Num n, Traced a) => Point (V a) n -> V a n -> a -> Maybe (V a n)
+ Diagrams.Trace: traceV :: ((~) * n N a, Num n, Traced a) => Point V a n -> V a n -> a -> Maybe V a n
- Diagrams.Transform: apply :: Transformation v n -> v n -> v n
+ Diagrams.Transform: apply :: () => Transformation v n -> v n -> v n
- Diagrams.Transform: moveOriginBy :: ((~) (* -> *) (V t) v, (~) * (N t) n, HasOrigin t) => v n -> t -> t
+ Diagrams.Transform: moveOriginBy :: ((~) (* -> *) V t v, (~) * N t n, HasOrigin t) => v n -> t -> t
- Diagrams.Transform: moveOriginTo :: HasOrigin t => Point (V t) (N t) -> t -> t
+ Diagrams.Transform: moveOriginTo :: HasOrigin t => Point V t N t -> t -> t
- Diagrams.Transform: transform :: Transformable t => Transformation (V t) (N t) -> t -> t
+ Diagrams.Transform: transform :: Transformable t => Transformation V t N t -> t -> t
- Diagrams.Transform: transl :: Transformation v n -> v n
+ Diagrams.Transform: transl :: () => Transformation v n -> v n
- Diagrams.Transform: translation :: v n -> Transformation v n
+ Diagrams.Transform: translation :: () => v n -> Transformation v n
- Diagrams.Transform.ScaleInv: scaleInvDir :: forall t_a14Ui. Lens' (ScaleInv t_a14Ui) (Vn t_a14Ui)
+ Diagrams.Transform.ScaleInv: scaleInvDir :: forall t_aQcd. Lens' (ScaleInv t_aQcd) (Vn t_aQcd)
- Diagrams.Transform.ScaleInv: scaleInvLoc :: forall t_a14Ui. Lens' (ScaleInv t_a14Ui) (Point (V t_a14Ui) (N t_a14Ui))
+ Diagrams.Transform.ScaleInv: scaleInvLoc :: forall t_aQcd. Lens' (ScaleInv t_aQcd) (Point (V t_aQcd) (N t_aQcd))
- Diagrams.Transform.ScaleInv: scaleInvObj :: forall t_a14Ui. Lens' (ScaleInv t_a14Ui) t_a14Ui
+ Diagrams.Transform.ScaleInv: scaleInvObj :: forall t_aQcd. Lens' (ScaleInv t_aQcd) t_aQcd
- Diagrams.TwoD: V2 :: ~a -> ~a -> V2 a
+ Diagrams.TwoD: V2 :: !a -> !a -> V2 a
- Diagrams.TwoD: _LG :: forall n_a27XY. Prism' (Texture n_a27XY) (LGradient n_a27XY)
+ Diagrams.TwoD: _LG :: forall n_a2hWx. Prism' (Texture n_a2hWx) (LGradient n_a2hWx)
- Diagrams.TwoD: _RG :: forall n_a27XY. Prism' (Texture n_a27XY) (RGradient n_a27XY)
+ Diagrams.TwoD: _RG :: forall n_a2hWx. Prism' (Texture n_a2hWx) (RGradient n_a2hWx)
- Diagrams.TwoD: _SC :: forall n_a27XY. Prism' (Texture n_a27XY) SomeColor
+ Diagrams.TwoD: _SC :: forall n_a2hWx. Prism' (Texture n_a2hWx) SomeColor
- Diagrams.TwoD: _x :: (R1 t, Functor f) => (a -> f a) -> t a -> f (t a)
+ Diagrams.TwoD: _x :: (R1 t, Functor f) => (a -> f a) -> t a -> f t a
- Diagrams.TwoD: _xy :: (R2 t, Functor f) => (V2 a -> f (V2 a)) -> t a -> f (t a)
+ Diagrams.TwoD: _xy :: (R2 t, Functor f) => (V2 a -> f V2 a) -> t a -> f t a
- Diagrams.TwoD: _y :: (R2 t, Functor f) => (a -> f a) -> t a -> f (t a)
+ Diagrams.TwoD: _y :: (R2 t, Functor f) => (a -> f a) -> t a -> f t a
- Diagrams.TwoD: eColor :: forall n_a2mEc. Lens' (EnvelopeOpts n_a2mEc) (Colour Double)
+ Diagrams.TwoD: eColor :: forall n_a2LbZ. Lens' (EnvelopeOpts n_a2LbZ) (Colour Double)
- Diagrams.TwoD: eLineWidth :: forall n_a2mEc n_a2mGb. Lens (EnvelopeOpts n_a2mEc) (EnvelopeOpts n_a2mGb) (Measure n_a2mEc) (Measure n_a2mGb)
+ Diagrams.TwoD: eLineWidth :: forall n_a2LbZ n_a2Lee. Lens (EnvelopeOpts n_a2LbZ) (EnvelopeOpts n_a2Lee) (Measure n_a2LbZ) (Measure n_a2Lee)
- Diagrams.TwoD: ePoints :: forall n_a2mEc. Lens' (EnvelopeOpts n_a2mEc) Int
+ Diagrams.TwoD: ePoints :: forall n_a2LbZ. Lens' (EnvelopeOpts n_a2LbZ) Int
- Diagrams.TwoD: oColor :: forall n_a2mDj. Lens' (OriginOpts n_a2mDj) (Colour Double)
+ Diagrams.TwoD: oColor :: forall n_a2Lb0. Lens' (OriginOpts n_a2Lb0) (Colour Double)
- Diagrams.TwoD: oMinSize :: forall n_a2mDj. Lens' (OriginOpts n_a2mDj) n_a2mDj
+ Diagrams.TwoD: oMinSize :: forall n_a2Lb0. Lens' (OriginOpts n_a2Lb0) n_a2Lb0
- Diagrams.TwoD: oScale :: forall n_a2mDj. Lens' (OriginOpts n_a2mDj) n_a2mDj
+ Diagrams.TwoD: oScale :: forall n_a2Lb0. Lens' (OriginOpts n_a2Lb0) n_a2Lb0
- Diagrams.TwoD: radiusBL :: forall d_a2AL2. Lens' (RoundedRectOpts d_a2AL2) d_a2AL2
+ Diagrams.TwoD: radiusBL :: forall d_a1YAb. Lens' (RoundedRectOpts d_a1YAb) d_a1YAb
- Diagrams.TwoD: radiusBR :: forall d_a2AL2. Lens' (RoundedRectOpts d_a2AL2) d_a2AL2
+ Diagrams.TwoD: radiusBR :: forall d_a1YAb. Lens' (RoundedRectOpts d_a1YAb) d_a1YAb
- Diagrams.TwoD: radiusTL :: forall d_a2AL2. Lens' (RoundedRectOpts d_a2AL2) d_a2AL2
+ Diagrams.TwoD: radiusTL :: forall d_a1YAb. Lens' (RoundedRectOpts d_a1YAb) d_a1YAb
- Diagrams.TwoD: radiusTR :: forall d_a2AL2. Lens' (RoundedRectOpts d_a2AL2) d_a2AL2
+ Diagrams.TwoD: radiusTR :: forall d_a1YAb. Lens' (RoundedRectOpts d_a1YAb) d_a1YAb
- Diagrams.TwoD: tColor :: forall n_a2mGA. Lens' (TraceOpts n_a2mGA) (Colour Double)
+ Diagrams.TwoD: tColor :: forall n_a2LeD. Lens' (TraceOpts n_a2LeD) (Colour Double)
- Diagrams.TwoD: tMinSize :: forall n_a2mGA. Lens' (TraceOpts n_a2mGA) n_a2mGA
+ Diagrams.TwoD: tMinSize :: forall n_a2LeD. Lens' (TraceOpts n_a2LeD) n_a2LeD
- Diagrams.TwoD: tPoints :: forall n_a2mGA. Lens' (TraceOpts n_a2mGA) Int
+ Diagrams.TwoD: tPoints :: forall n_a2LeD. Lens' (TraceOpts n_a2LeD) Int
- Diagrams.TwoD: tScale :: forall n_a2mGA. Lens' (TraceOpts n_a2mGA) n_a2mGA
+ Diagrams.TwoD: tScale :: forall n_a2LeD. Lens' (TraceOpts n_a2LeD) n_a2LeD
- Diagrams.TwoD: translation :: v n -> Transformation v n
+ Diagrams.TwoD: translation :: () => v n -> Transformation v n
- Diagrams.TwoD.Attributes: _LG :: forall n_a27XY. Prism' (Texture n_a27XY) (LGradient n_a27XY)
+ Diagrams.TwoD.Attributes: _LG :: forall n_a2hWx. Prism' (Texture n_a2hWx) (LGradient n_a2hWx)
- Diagrams.TwoD.Attributes: _RG :: forall n_a27XY. Prism' (Texture n_a27XY) (RGradient n_a27XY)
+ Diagrams.TwoD.Attributes: _RG :: forall n_a2hWx. Prism' (Texture n_a2hWx) (RGradient n_a2hWx)
- Diagrams.TwoD.Attributes: _SC :: forall n_a27XY. Prism' (Texture n_a27XY) SomeColor
+ Diagrams.TwoD.Attributes: _SC :: forall n_a2hWx. Prism' (Texture n_a2hWx) SomeColor
- Diagrams.TwoD.Model: eColor :: forall n_a2mEc. Lens' (EnvelopeOpts n_a2mEc) (Colour Double)
+ Diagrams.TwoD.Model: eColor :: forall n_a2LbZ. Lens' (EnvelopeOpts n_a2LbZ) (Colour Double)
- Diagrams.TwoD.Model: eLineWidth :: forall n_a2mEc n_a2mGb. Lens (EnvelopeOpts n_a2mEc) (EnvelopeOpts n_a2mGb) (Measure n_a2mEc) (Measure n_a2mGb)
+ Diagrams.TwoD.Model: eLineWidth :: forall n_a2LbZ n_a2Lee. Lens (EnvelopeOpts n_a2LbZ) (EnvelopeOpts n_a2Lee) (Measure n_a2LbZ) (Measure n_a2Lee)
- Diagrams.TwoD.Model: ePoints :: forall n_a2mEc. Lens' (EnvelopeOpts n_a2mEc) Int
+ Diagrams.TwoD.Model: ePoints :: forall n_a2LbZ. Lens' (EnvelopeOpts n_a2LbZ) Int
- Diagrams.TwoD.Model: oColor :: forall n_a2mDj. Lens' (OriginOpts n_a2mDj) (Colour Double)
+ Diagrams.TwoD.Model: oColor :: forall n_a2Lb0. Lens' (OriginOpts n_a2Lb0) (Colour Double)
- Diagrams.TwoD.Model: oMinSize :: forall n_a2mDj. Lens' (OriginOpts n_a2mDj) n_a2mDj
+ Diagrams.TwoD.Model: oMinSize :: forall n_a2Lb0. Lens' (OriginOpts n_a2Lb0) n_a2Lb0
- Diagrams.TwoD.Model: oScale :: forall n_a2mDj. Lens' (OriginOpts n_a2mDj) n_a2mDj
+ Diagrams.TwoD.Model: oScale :: forall n_a2Lb0. Lens' (OriginOpts n_a2Lb0) n_a2Lb0
- Diagrams.TwoD.Model: tColor :: forall n_a2mGA. Lens' (TraceOpts n_a2mGA) (Colour Double)
+ Diagrams.TwoD.Model: tColor :: forall n_a2LeD. Lens' (TraceOpts n_a2LeD) (Colour Double)
- Diagrams.TwoD.Model: tMinSize :: forall n_a2mGA. Lens' (TraceOpts n_a2mGA) n_a2mGA
+ Diagrams.TwoD.Model: tMinSize :: forall n_a2LeD. Lens' (TraceOpts n_a2LeD) n_a2LeD
- Diagrams.TwoD.Model: tPoints :: forall n_a2mGA. Lens' (TraceOpts n_a2mGA) Int
+ Diagrams.TwoD.Model: tPoints :: forall n_a2LeD. Lens' (TraceOpts n_a2LeD) Int
- Diagrams.TwoD.Model: tScale :: forall n_a2mGA. Lens' (TraceOpts n_a2mGA) n_a2mGA
+ Diagrams.TwoD.Model: tScale :: forall n_a2LeD. Lens' (TraceOpts n_a2LeD) n_a2LeD
- Diagrams.TwoD.Shapes: radiusBL :: forall d_a2AL2. Lens' (RoundedRectOpts d_a2AL2) d_a2AL2
+ Diagrams.TwoD.Shapes: radiusBL :: forall d_a1YAb. Lens' (RoundedRectOpts d_a1YAb) d_a1YAb
- Diagrams.TwoD.Shapes: radiusBR :: forall d_a2AL2. Lens' (RoundedRectOpts d_a2AL2) d_a2AL2
+ Diagrams.TwoD.Shapes: radiusBR :: forall d_a1YAb. Lens' (RoundedRectOpts d_a1YAb) d_a1YAb
- Diagrams.TwoD.Shapes: radiusTL :: forall d_a2AL2. Lens' (RoundedRectOpts d_a2AL2) d_a2AL2
+ Diagrams.TwoD.Shapes: radiusTL :: forall d_a1YAb. Lens' (RoundedRectOpts d_a1YAb) d_a1YAb
- Diagrams.TwoD.Shapes: radiusTR :: forall d_a2AL2. Lens' (RoundedRectOpts d_a2AL2) d_a2AL2
+ Diagrams.TwoD.Shapes: radiusTR :: forall d_a1YAb. Lens' (RoundedRectOpts d_a1YAb) d_a1YAb
- Diagrams.TwoD.Transform: translation :: v n -> Transformation v n
+ Diagrams.TwoD.Transform: translation :: () => v n -> Transformation v n
- Diagrams.TwoD.Types: V2 :: ~a -> ~a -> V2 a
+ Diagrams.TwoD.Types: V2 :: !a -> !a -> V2 a
- Diagrams.TwoD.Types: _x :: (R1 t, Functor f) => (a -> f a) -> t a -> f (t a)
+ Diagrams.TwoD.Types: _x :: (R1 t, Functor f) => (a -> f a) -> t a -> f t a
- Diagrams.TwoD.Types: _xy :: (R2 t, Functor f) => (V2 a -> f (V2 a)) -> t a -> f (t a)
+ Diagrams.TwoD.Types: _xy :: (R2 t, Functor f) => (V2 a -> f V2 a) -> t a -> f t a
- Diagrams.TwoD.Types: _y :: (R2 t, Functor f) => (a -> f a) -> t a -> f (t a)
+ Diagrams.TwoD.Types: _y :: (R2 t, Functor f) => (a -> f a) -> t a -> f t a

Files

CHANGELOG.md view
@@ -1,3 +1,16 @@+## [v1.4.2](https://github.com/diagrams/diagrams-lib/tree/v1.4.2) (2017-12-20)++- New functions:+    - `boxGrid`, for computing a grid of regularly spaced points.+    - `scalingRotationTo` and `scaleRotateTo`, for affine conformal 2D+      transformations.+- Documentation fixes:+    - `dirBetween`+    - `PolyOrientation`+- Upper bound updates: allow `tasty-0.12`, `tasty-quickcheck-0.9`,+  `tasty-hunit-0.10`, `optparse-applicative-0.14`+- Test with GHC 8.2.2+ ## [v1.4.1.2](https://github.com/diagrams/diagrams-lib/tree/v1.4.1.2) (2017-06-10)  - Fix test suite compilation failure [#299](https://github.com/diagrams/diagrams-lib/issues/299).
diagrams-lib.cabal view
@@ -1,5 +1,5 @@ Name:                diagrams-lib-Version:             1.4.1.2+Version:             1.4.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@@ -18,10 +18,10 @@ Bug-reports:         http://github.com/diagrams/diagrams-lib/issues Category:            Graphics Build-type:          Simple-Cabal-version:       >=1.10+Cabal-version:       >=1.18 Extra-source-files:  CHANGELOG.md, README.markdown, diagrams/*.svg Extra-doc-files:     diagrams/*.svg-Tested-with:         GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1+Tested-with:         GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.2.2 Source-repository head   type:     git   location: http://github.com/diagrams/diagrams-lib.git@@ -115,14 +115,14 @@                        intervals >= 0.7 && < 0.9,                        lens >= 4.6 && < 4.16,                        tagged >= 0.7,-                       optparse-applicative >= 0.11 && < 0.14,+                       optparse-applicative >= 0.11 && < 0.15,                        filepath,                        JuicyPixels >= 3.1.5 && < 3.3,                        hashable >= 1.1 && < 1.3,                        linear >= 1.20.1 && < 1.21,                        adjunctions >= 4.0 && < 5.0,                        distributive >=0.2.2 && < 1.0,-                       process >= 1.1 && < 1.5,+                       process >= 1.1 && < 1.7,                        fsnotify >= 0.2.1 && < 0.3,                        directory >= 1.2 && < 1.4,                        unordered-containers >= 0.2 && < 0.3,@@ -158,9 +158,9 @@                , Instances   hs-source-dirs: test   build-depends:       base,-                       tasty >= 0.10 && < 0.12,-                       tasty-hunit >= 0.9.2 && < 0.10,-                       tasty-quickcheck >= 0.8 && < 0.9,+                       tasty >= 0.10 && < 0.13,+                       tasty-hunit >= 0.9.2 && < 0.11,+                       tasty-quickcheck >= 0.8 && < 0.10,                        deepseq >= 1.3 && < 1.5,                        diagrams-lib,                        lens,
src/Diagrams/BoundingBox.hs view
@@ -41,6 +41,8 @@   , contains, contains'   , inside, inside', outside, outside' +  , boxGrid+     -- * Operations on bounding boxes   , union, intersection   ) where@@ -311,3 +313,20 @@ --   function is just an alias for @mappend@. union :: (Additive v, Ord n) => BoundingBox v n -> BoundingBox v n -> BoundingBox v n union = mappend++-- | @boxGrid f box@ returns a grid of regularly spaced points inside+--   the box, such that there are @(1/f)@ points along each dimension.+--   For example, for a 3D box with corners at (0,0,0) and (2,2,2),+--   @boxGrid 0.1@ would yield a grid of approximately 1000 points (it+--   might actually be @11^3@ instead of @10^3@) spaced @0.2@ units+--   apart.+boxGrid+  :: (Traversable v, Additive v, Num n, Enum n)+  => n -> BoundingBox v n -> [Point v n]+boxGrid f = maybe [] (sequenceA . uncurry (liftI2 mkRange)) . getCorners+  where+    mkRange lo hi = [lo, (1-f)*lo + f*hi .. hi]++    -- liftA2 mkRange on the two corner points creates a (Point V2+    -- [n]), where each component is the range of values for that+    -- dimension.  sequenceA then yields a grid of type [Point V2 n].
src/Diagrams/Direction.hs view
@@ -80,6 +80,6 @@   => Direction v n -> Direction v n -> Angle n angleBetweenDirs d1 d2 = angleBetween (fromDirection d1) (fromDirection d2) --- | @dirBetween p q@ returns the directions from @p@ to @q@+-- | @dirBetween p q@ returns the direction from @p@ to @q@. dirBetween :: (Additive v, Num n) => Point v n -> Point v n -> Direction v n-dirBetween p q = dir $ p .-. q+dirBetween p q = dir $ q .-. p
src/Diagrams/TwoD.hs view
@@ -212,6 +212,8 @@        , translationX, translateX        , translationY, translateY        , translation, translate+         -- ** Conformal affine maps+       , scalingRotationTo, scaleRotateTo          -- ** Reflection        , reflectionX, reflectX        , reflectionY, reflectY
src/Diagrams/TwoD/Polygons.hs view
@@ -126,10 +126,10 @@ -- | Determine how a polygon should be oriented. data PolyOrientation n = NoOrient        -- ^ No special orientation; the first                                          --   vertex will be at (1,0).-                                         --   This is the default.                        | OrientH         -- ^ Orient /horizontally/, so the                                          --   bottommost edge is parallel to                                          --   the x-axis.+                                         --   This is the default.                        | OrientV         -- ^ Orient /vertically/, so the                                          --   leftmost edge is parallel to the                                          --   y-axis.
src/Diagrams/TwoD/Transform.hs view
@@ -39,6 +39,9 @@        , translationY, translateY        , translation, translate +         -- * Conformal affine maps+       , scalingRotationTo, scaleRotateTo+          -- * Reflection        , reflectionX, reflectX        , reflectionY, reflectY@@ -56,6 +59,7 @@ import           Diagrams.Core.Transform import           Diagrams.Direction import           Diagrams.Transform+import           Diagrams.Transform.Matrix import           Diagrams.TwoD.Types import           Diagrams.TwoD.Vector @@ -65,6 +69,7 @@ import           Linear.Affine import           Linear.V2 import           Linear.Vector+import           Linear.Metric  -- Rotation ------------------------------------------------ @@ -183,7 +188,28 @@   => n -> t -> t translateY = transform . translationY +-- Conformal affine maps ----------------------------------- +-- | The angle-preserving linear map that aligns the x-axis unit vector+--   with the given vector.  See also 'scaleRotateTo'.+scalingRotationTo :: (Floating n) => V2 n -> T2 n+scalingRotationTo v = fromMatWithInv (conf v) (conf w) zero+  where+    w = reflectY (v ^/ quadrance v)+    conf (V2 a b) = (V2 (V2 a (-b)) (V2 b a))++-- | Rotate and uniformly scale around the local origin such that the+--   x-axis aligns with the given vector.  This satisfies the equation+--+-- @+-- scaleRotateTo v = rotateTo (dir v) . scale (norm v)+-- @+--+-- up to floating point rounding errors, but is more accurate and+-- performant since it avoids cancellable uses of trigonometric functions.+scaleRotateTo :: (InSpace V2 n t, Transformable t, Floating n)+              => V2 n -> t -> t+scaleRotateTo = transform . scalingRotationTo  -- Reflection ----------------------------------------------