hgeometry-ipe 0.11.0.0 → 0.12.0.0
raw patch · 8 files changed
+126/−69 lines, 8 filesdep +singletons-thdep ~hgeometrydep ~hgeometry-combinatorialdep ~singletonsPVP ok
version bump matches the API change (PVP)
Dependencies added: singletons-th
Dependency ranges changed: hgeometry, hgeometry-combinatorial, singletons
API changes (from Hackage documentation)
- Data.Geometry.Ipe.Attributes: type SAttributeUniverse = (Sing :: AttributeUniverse -> Type)
- Data.Geometry.Ipe.Content: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Data.Geometry.Ipe.Content.AttrMapSym1 r6989586621679265591)
- Data.Geometry.Ipe.FromIpe: instance Data.Geometry.Ipe.FromIpe.HasDefaultFromIpe (Data.Geometry.LineSegment.LineSegment 2 () r)
- Data.Geometry.Ipe.IpeOut: instance (Data.Geometry.Ipe.IpeOut.HasDefaultIpeOut g, a Data.Type.Equality.~ Data.Geometry.Ipe.Content.IpeAttributes (Data.Geometry.Ipe.IpeOut.DefaultIpeOut g) (Data.Geometry.Properties.NumType g)) => Data.Geometry.Ipe.IpeOut.HasDefaultIpeOut (g Data.Ext.:+ a)
- Data.Geometry.Ipe.IpeOut: instance Data.Geometry.Ipe.IpeOut.HasDefaultIpeOut (Data.Geometry.LineSegment.LineSegment 2 p r)
- Data.Geometry.Ipe.Writer: instance Data.Fixed.HasResolution p => Data.Geometry.Ipe.Writer.IpeWriteText (Data.Fixed.Fixed p)
- Data.Geometry.Ipe.Writer: instance Data.Geometry.Ipe.Writer.IpeWriteText r => Data.Geometry.Ipe.Writer.IpeWrite (Data.Geometry.LineSegment.LineSegment 2 p r)
+ Data.Geometry.Ipe.Attributes: [SArrow] :: SAttributeUniverse ('Arrow :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SClip] :: SAttributeUniverse ('Clip :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SDash] :: SAttributeUniverse ('Dash :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SFillRule] :: SAttributeUniverse ('FillRule :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SFill] :: SAttributeUniverse ('Fill :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SGradient] :: SAttributeUniverse ('Gradient :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SLayer] :: SAttributeUniverse ('Layer :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SLineCap] :: SAttributeUniverse ('LineCap :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SLineJoin] :: SAttributeUniverse ('LineJoin :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SMatrix] :: SAttributeUniverse ('Matrix :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SOpacity] :: SAttributeUniverse ('Opacity :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SPen] :: SAttributeUniverse ('Pen :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SPin] :: SAttributeUniverse ('Pin :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SRArrow] :: SAttributeUniverse ('RArrow :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SSize] :: SAttributeUniverse ('Size :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [SStroke] :: SAttributeUniverse ('Stroke :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [STiling] :: SAttributeUniverse ('Tiling :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: [STransformations] :: SAttributeUniverse ('Transformations :: AttributeUniverse)
+ Data.Geometry.Ipe.Attributes: data SAttributeUniverse z_aBkb
+ Data.Geometry.Ipe.Content: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Data.Geometry.Ipe.Content.AttrMapSym1 a6989586621679194633)
+ Data.Geometry.Ipe.FromIpe: instance Data.Geometry.Ipe.FromIpe.HasDefaultFromIpe (Data.Geometry.LineSegment.Internal.LineSegment 2 () r)
+ Data.Geometry.Ipe.IpeOut: defaultBox :: Num r => Rectangle () r
+ Data.Geometry.Ipe.IpeOut: instance (Data.Geometry.Ipe.IpeOut.HasDefaultIpeOut g, a GHC.Types.~ Data.Geometry.Ipe.Content.IpeAttributes (Data.Geometry.Ipe.IpeOut.DefaultIpeOut g) (Data.Geometry.Properties.NumType g)) => Data.Geometry.Ipe.IpeOut.HasDefaultIpeOut (g Data.Ext.:+ a)
+ Data.Geometry.Ipe.IpeOut: instance (GHC.Real.Fractional r, GHC.Classes.Ord r) => Data.Geometry.Ipe.IpeOut.HasDefaultIpeOut (Data.Geometry.HalfLine.HalfLine 2 r)
+ Data.Geometry.Ipe.IpeOut: instance Data.Geometry.Ipe.IpeOut.HasDefaultIpeOut (Data.Geometry.LineSegment.Internal.LineSegment 2 p r)
+ Data.Geometry.Ipe.IpeOut: ipeHalfLine :: (Ord r, Fractional r) => IpeOut (HalfLine 2 r) Path r
+ Data.Geometry.Ipe.IpeOut: ipeHalfLineIn :: forall p r. (Ord r, Fractional r) => Rectangle p r -> IpeOut (HalfLine 2 r) Path r
+ Data.Geometry.Ipe.IpeOut: ipeLine :: (Ord r, Fractional r) => IpeOut (Line 2 r) Path r
+ Data.Geometry.Ipe.IpeOut: ipeLineIn :: forall p r. (Ord r, Fractional r) => Rectangle p r -> IpeOut (Line 2 r) Path r
+ Data.Geometry.Ipe.Reader: readSinglePageFileThrow :: (Coordinate r, Eq r) => FilePath -> IO (IpePage r)
+ Data.Geometry.Ipe.Writer: instance Data.Geometry.Ipe.Writer.IpeWriteText r => Data.Geometry.Ipe.Writer.IpeWrite (Data.Geometry.LineSegment.Internal.LineSegment 2 p r)
+ Data.Geometry.Ipe.Writer: instance forall k (p :: k). Data.Fixed.HasResolution p => Data.Geometry.Ipe.Writer.IpeWriteText (Data.Fixed.Fixed p)
- Data.Geometry.Ipe.Attributes: Attrs :: Rec (Attr f) ats -> Attributes
+ Data.Geometry.Ipe.Attributes: Attrs :: Rec (Attr f) ats -> Attributes (f :: TyFun u * -> *) (ats :: [u])
- Data.Geometry.Ipe.Attributes: GAttr :: Maybe (Apply f label) -> Attr
+ Data.Geometry.Ipe.Attributes: GAttr :: Maybe (Apply f label) -> Attr (f :: TyFun u * -> *) (label :: u)
- Data.Geometry.Ipe.Attributes: [_getAttr] :: Attr -> Maybe (Apply f label)
+ Data.Geometry.Ipe.Attributes: [_getAttr] :: Attr (f :: TyFun u * -> *) (label :: u) -> Maybe (Apply f label)
- Data.Geometry.Ipe.Attributes: arrowName :: forall r_aUQC. Lens' (IpeArrow r_aUQC) Text
+ Data.Geometry.Ipe.Attributes: arrowName :: forall r_aCvr. Lens' (IpeArrow r_aCvr) Text
- Data.Geometry.Ipe.Attributes: arrowSize :: forall r_aUQC r_aX8W. Lens (IpeArrow r_aUQC) (IpeArrow r_aX8W) (IpeSize r_aUQC) (IpeSize r_aX8W)
+ Data.Geometry.Ipe.Attributes: arrowSize :: forall r_aCvr r_aEFu. Lens (IpeArrow r_aCvr) (IpeArrow r_aEFu) (IpeSize r_aCvr) (IpeSize r_aEFu)
- Data.Geometry.Ipe.Attributes: getAttr :: forall f_aTsa label_aTsb f_aUPS label_aUPT. Iso (Attr f_aTsa label_aTsb) (Attr f_aUPS label_aUPT) (Maybe (Apply f_aTsa label_aTsb)) (Maybe (Apply f_aUPS label_aUPT))
+ Data.Geometry.Ipe.Attributes: getAttr :: forall u_aBkX (f_aBkY :: TyFun u_aBkX Type -> Type) (label_aBkZ :: u_aBkX) u_aCuG (f_aCuH :: TyFun u_aCuG Type -> Type) (label_aCuI :: u_aCuG). Iso (Attr (f_aBkY :: TyFun u_aBkX Type -> Type) (label_aBkZ :: u_aBkX)) (Attr (f_aCuH :: TyFun u_aCuG Type -> Type) (label_aCuI :: u_aCuG)) (Maybe (Apply f_aBkY label_aBkZ)) (Maybe (Apply f_aCuH label_aCuI))
- Data.Geometry.Ipe.Attributes: type ArrowSym0 = 'Arrow
+ Data.Geometry.Ipe.Attributes: type ArrowSym0 = 'Arrow :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type ClipSym0 = 'Clip
+ Data.Geometry.Ipe.Attributes: type ClipSym0 = 'Clip :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type DashSym0 = 'Dash
+ Data.Geometry.Ipe.Attributes: type DashSym0 = 'Dash :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type FillRuleSym0 = 'FillRule
+ Data.Geometry.Ipe.Attributes: type FillRuleSym0 = 'FillRule :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type FillSym0 = 'Fill
+ Data.Geometry.Ipe.Attributes: type FillSym0 = 'Fill :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type GradientSym0 = 'Gradient
+ Data.Geometry.Ipe.Attributes: type GradientSym0 = 'Gradient :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type LayerSym0 = 'Layer
+ Data.Geometry.Ipe.Attributes: type LayerSym0 = 'Layer :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type LineCapSym0 = 'LineCap
+ Data.Geometry.Ipe.Attributes: type LineCapSym0 = 'LineCap :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type LineJoinSym0 = 'LineJoin
+ Data.Geometry.Ipe.Attributes: type LineJoinSym0 = 'LineJoin :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type MatrixSym0 = 'Matrix
+ Data.Geometry.Ipe.Attributes: type MatrixSym0 = 'Matrix :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type OpacitySym0 = 'Opacity
+ Data.Geometry.Ipe.Attributes: type OpacitySym0 = 'Opacity :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type PenSym0 = 'Pen
+ Data.Geometry.Ipe.Attributes: type PenSym0 = 'Pen :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type PinSym0 = 'Pin
+ Data.Geometry.Ipe.Attributes: type PinSym0 = 'Pin :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type RArrowSym0 = 'RArrow
+ Data.Geometry.Ipe.Attributes: type RArrowSym0 = 'RArrow :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type SizeSym0 = 'Size
+ Data.Geometry.Ipe.Attributes: type SizeSym0 = 'Size :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type StrokeSym0 = 'Stroke
+ Data.Geometry.Ipe.Attributes: type StrokeSym0 = 'Stroke :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type TilingSym0 = 'Tiling
+ Data.Geometry.Ipe.Attributes: type TilingSym0 = 'Tiling :: AttributeUniverse
- Data.Geometry.Ipe.Attributes: type TransformationsSym0 = 'Transformations
+ Data.Geometry.Ipe.Attributes: type TransformationsSym0 = 'Transformations :: AttributeUniverse
- Data.Geometry.Ipe.Content: _IpeGroup :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' Group r_a14D9)
+ Data.Geometry.Ipe.Content: _IpeGroup :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' Group r_aM5J)
- Data.Geometry.Ipe.Content: _IpeImage :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' Image r_a14D9)
+ Data.Geometry.Ipe.Content: _IpeImage :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' Image r_aM5J)
- Data.Geometry.Ipe.Content: _IpeMiniPage :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' MiniPage r_a14D9)
+ Data.Geometry.Ipe.Content: _IpeMiniPage :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' MiniPage r_aM5J)
- Data.Geometry.Ipe.Content: _IpePath :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' Path r_a14D9)
+ Data.Geometry.Ipe.Content: _IpePath :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' Path r_aM5J)
- Data.Geometry.Ipe.Content: _IpeTextLabel :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' TextLabel r_a14D9)
+ Data.Geometry.Ipe.Content: _IpeTextLabel :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' TextLabel r_aM5J)
- Data.Geometry.Ipe.Content: _IpeUse :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' IpeSymbol r_a14D9)
+ Data.Geometry.Ipe.Content: _IpeUse :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' IpeSymbol r_aM5J)
- Data.Geometry.Ipe.Content: data AttrMapSym1 (r6989586621679265591 :: Type) :: (~>) AttributeUniverse Type
+ Data.Geometry.Ipe.Content: data AttrMapSym1 a6989586621679194633 a6989586621679194634
- Data.Geometry.Ipe.Content: imageData :: forall r_a13EG. Lens' (Image r_a13EG) ()
+ Data.Geometry.Ipe.Content: imageData :: forall r_aL7l. Lens' (Image r_aL7l) ()
- Data.Geometry.Ipe.Content: pathSegments :: forall r_apCI r_auxN. Iso (Path r_apCI) (Path r_auxN) (LSeq 1 (PathSegment r_apCI)) (LSeq 1 (PathSegment r_auxN))
+ Data.Geometry.Ipe.Content: pathSegments :: forall r_aiLD r_akHZ. Iso (Path r_aiLD) (Path r_akHZ) (LSeq 1 (PathSegment r_aiLD)) (LSeq 1 (PathSegment r_akHZ))
- Data.Geometry.Ipe.Content: rect :: forall r_a13EG r_a13KH. Lens (Image r_a13EG) (Image r_a13KH) (Rectangle () r_a13EG) (Rectangle () r_a13KH)
+ Data.Geometry.Ipe.Content: rect :: forall r_aL7l r_aLf6. Lens (Image r_aL7l) (Image r_aLf6) (Rectangle () r_aL7l) (Rectangle () r_aLf6)
- Data.Geometry.Ipe.Content: symbolName :: forall r_a13L1. Lens' (IpeSymbol r_a13L1) Text
+ Data.Geometry.Ipe.Content: symbolName :: forall r_aLfq. Lens' (IpeSymbol r_aLfq) Text
- Data.Geometry.Ipe.Content: symbolPoint :: forall r_a13L1 r_a14xB. Lens (IpeSymbol r_a13L1) (IpeSymbol r_a14xB) (Point 2 r_a13L1) (Point 2 r_a14xB)
+ Data.Geometry.Ipe.Content: symbolPoint :: forall r_aLfq r_aM1h. Lens (IpeSymbol r_aLfq) (IpeSymbol r_aM1h) (Point 2 r_aLfq) (Point 2 r_aM1h)
- Data.Geometry.Ipe.FromIpe: readAll :: (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r]
+ Data.Geometry.Ipe.FromIpe: readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r]
- Data.Geometry.Ipe.Path: _ArcSegment :: forall r_aodI. Prism' (PathSegment r_aodI) ()
+ Data.Geometry.Ipe.Path: _ArcSegment :: forall r_ai6x. Prism' (PathSegment r_ai6x) ()
- Data.Geometry.Ipe.Path: _ArcTo :: forall r_auy0. Prism' (Operation r_auy0) (Matrix 3 3 r_auy0, Point 2 r_auy0)
+ Data.Geometry.Ipe.Path: _ArcTo :: forall r_akIc. Prism' (Operation r_akIc) (Matrix 3 3 r_akIc, Point 2 r_akIc)
- Data.Geometry.Ipe.Path: _ClosePath :: forall r_auy0. Prism' (Operation r_auy0) ()
+ Data.Geometry.Ipe.Path: _ClosePath :: forall r_akIc. Prism' (Operation r_akIc) ()
- Data.Geometry.Ipe.Path: _ClosedSpline :: forall r_auy0. Prism' (Operation r_auy0) [Point 2 r_auy0]
+ Data.Geometry.Ipe.Path: _ClosedSpline :: forall r_akIc. Prism' (Operation r_akIc) [Point 2 r_akIc]
- Data.Geometry.Ipe.Path: _ClosedSplineSegment :: forall r_aodI. Prism' (PathSegment r_aodI) ()
+ Data.Geometry.Ipe.Path: _ClosedSplineSegment :: forall r_ai6x. Prism' (PathSegment r_ai6x) ()
- Data.Geometry.Ipe.Path: _CubicBezierSegment :: forall r_aodI. Prism' (PathSegment r_aodI) (BezierSpline 3 2 r_aodI)
+ Data.Geometry.Ipe.Path: _CubicBezierSegment :: forall r_ai6x. Prism' (PathSegment r_ai6x) (BezierSpline 3 2 r_ai6x)
- Data.Geometry.Ipe.Path: _CurveTo :: forall r_auy0. Prism' (Operation r_auy0) (Point 2 r_auy0, Point 2 r_auy0, Point 2 r_auy0)
+ Data.Geometry.Ipe.Path: _CurveTo :: forall r_akIc. Prism' (Operation r_akIc) (Point 2 r_akIc, Point 2 r_akIc, Point 2 r_akIc)
- Data.Geometry.Ipe.Path: _Ellipse :: forall r_auy0. Prism' (Operation r_auy0) (Matrix 3 3 r_auy0)
+ Data.Geometry.Ipe.Path: _Ellipse :: forall r_akIc. Prism' (Operation r_akIc) (Matrix 3 3 r_akIc)
- Data.Geometry.Ipe.Path: _EllipseSegment :: forall r_aodI. Prism' (PathSegment r_aodI) (Ellipse r_aodI)
+ Data.Geometry.Ipe.Path: _EllipseSegment :: forall r_ai6x. Prism' (PathSegment r_ai6x) (Ellipse r_ai6x)
- Data.Geometry.Ipe.Path: _LineTo :: forall r_auy0. Prism' (Operation r_auy0) (Point 2 r_auy0)
+ Data.Geometry.Ipe.Path: _LineTo :: forall r_akIc. Prism' (Operation r_akIc) (Point 2 r_akIc)
- Data.Geometry.Ipe.Path: _MoveTo :: forall r_auy0. Prism' (Operation r_auy0) (Point 2 r_auy0)
+ Data.Geometry.Ipe.Path: _MoveTo :: forall r_akIc. Prism' (Operation r_akIc) (Point 2 r_akIc)
- Data.Geometry.Ipe.Path: _PolyLineSegment :: forall r_aodI. Prism' (PathSegment r_aodI) (PolyLine 2 () r_aodI)
+ Data.Geometry.Ipe.Path: _PolyLineSegment :: forall r_ai6x. Prism' (PathSegment r_ai6x) (PolyLine 2 () r_ai6x)
- Data.Geometry.Ipe.Path: _PolygonPath :: forall r_aodI. Prism' (PathSegment r_aodI) (SimplePolygon () r_aodI)
+ Data.Geometry.Ipe.Path: _PolygonPath :: forall r_ai6x. Prism' (PathSegment r_ai6x) (SimplePolygon () r_ai6x)
- Data.Geometry.Ipe.Path: _QCurveTo :: forall r_auy0. Prism' (Operation r_auy0) (Point 2 r_auy0, Point 2 r_auy0)
+ Data.Geometry.Ipe.Path: _QCurveTo :: forall r_akIc. Prism' (Operation r_akIc) (Point 2 r_akIc, Point 2 r_akIc)
- Data.Geometry.Ipe.Path: _QuadraticBezierSegment :: forall r_aodI. Prism' (PathSegment r_aodI) (BezierSpline 2 2 r_aodI)
+ Data.Geometry.Ipe.Path: _QuadraticBezierSegment :: forall r_ai6x. Prism' (PathSegment r_ai6x) (BezierSpline 2 2 r_ai6x)
- Data.Geometry.Ipe.Path: _Spline :: forall r_auy0. Prism' (Operation r_auy0) [Point 2 r_auy0]
+ Data.Geometry.Ipe.Path: _Spline :: forall r_akIc. Prism' (Operation r_akIc) [Point 2 r_akIc]
- Data.Geometry.Ipe.Path: _SplineSegment :: forall r_aodI. Prism' (PathSegment r_aodI) ()
+ Data.Geometry.Ipe.Path: _SplineSegment :: forall r_ai6x. Prism' (PathSegment r_ai6x) ()
- Data.Geometry.Ipe.Path: pathSegments :: forall r_apCI r_auxN. Iso (Path r_apCI) (Path r_auxN) (LSeq 1 (PathSegment r_apCI)) (LSeq 1 (PathSegment r_auxN))
+ Data.Geometry.Ipe.Path: pathSegments :: forall r_aiLD r_akHZ. Iso (Path r_aiLD) (Path r_akHZ) (LSeq 1 (PathSegment r_aiLD)) (LSeq 1 (PathSegment r_akHZ))
- Data.Geometry.Ipe.Types: _IpeGroup :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' Group r_a14D9)
+ Data.Geometry.Ipe.Types: _IpeGroup :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' Group r_aM5J)
- Data.Geometry.Ipe.Types: _IpeImage :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' Image r_a14D9)
+ Data.Geometry.Ipe.Types: _IpeImage :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' Image r_aM5J)
- Data.Geometry.Ipe.Types: _IpeMiniPage :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' MiniPage r_a14D9)
+ Data.Geometry.Ipe.Types: _IpeMiniPage :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' MiniPage r_aM5J)
- Data.Geometry.Ipe.Types: _IpePath :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' Path r_a14D9)
+ Data.Geometry.Ipe.Types: _IpePath :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' Path r_aM5J)
- Data.Geometry.Ipe.Types: _IpeTextLabel :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' TextLabel r_a14D9)
+ Data.Geometry.Ipe.Types: _IpeTextLabel :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' TextLabel r_aM5J)
- Data.Geometry.Ipe.Types: _IpeUse :: forall r_a14D9. Prism' (IpeObject r_a14D9) (IpeObject' IpeSymbol r_a14D9)
+ Data.Geometry.Ipe.Types: _IpeUse :: forall r_aM5J. Prism' (IpeObject r_aM5J) (IpeObject' IpeSymbol r_aM5J)
- Data.Geometry.Ipe.Types: content :: forall r_a1hoe r_a1hs3. Lens (IpePage r_a1hoe) (IpePage r_a1hs3) [IpeObject r_a1hoe] [IpeObject r_a1hs3]
+ Data.Geometry.Ipe.Types: content :: forall r_aYqu r_aYu8. Lens (IpePage r_aYqu) (IpePage r_aYu8) [IpeObject r_aYqu] [IpeObject r_aYu8]
- Data.Geometry.Ipe.Types: data AttrMapSym1 (r6989586621679265591 :: Type) :: (~>) AttributeUniverse Type
+ Data.Geometry.Ipe.Types: data AttrMapSym1 a6989586621679194633 a6989586621679194634
- Data.Geometry.Ipe.Types: imageData :: forall r_a13EG. Lens' (Image r_a13EG) ()
+ Data.Geometry.Ipe.Types: imageData :: forall r_aL7l. Lens' (Image r_aL7l) ()
- Data.Geometry.Ipe.Types: layers :: forall r_a1hoe. Lens' (IpePage r_a1hoe) [LayerName]
+ Data.Geometry.Ipe.Types: layers :: forall r_aYqu. Lens' (IpePage r_aYqu) [LayerName]
- Data.Geometry.Ipe.Types: pages :: forall r_a1hsw r_a1hLQ. Lens (IpeFile r_a1hsw) (IpeFile r_a1hLQ) (NonEmpty (IpePage r_a1hsw)) (NonEmpty (IpePage r_a1hLQ))
+ Data.Geometry.Ipe.Types: pages :: forall r_aYuB r_aYIp. Lens (IpeFile r_aYuB) (IpeFile r_aYIp) (NonEmpty (IpePage r_aYuB)) (NonEmpty (IpePage r_aYIp))
- Data.Geometry.Ipe.Types: pathSegments :: forall r_apCI r_auxN. Iso (Path r_apCI) (Path r_auxN) (LSeq 1 (PathSegment r_apCI)) (LSeq 1 (PathSegment r_auxN))
+ Data.Geometry.Ipe.Types: pathSegments :: forall r_aiLD r_akHZ. Iso (Path r_aiLD) (Path r_akHZ) (LSeq 1 (PathSegment r_aiLD)) (LSeq 1 (PathSegment r_akHZ))
- Data.Geometry.Ipe.Types: preamble :: forall r_a1hsw. Lens' (IpeFile r_a1hsw) (Maybe IpePreamble)
+ Data.Geometry.Ipe.Types: preamble :: forall r_aYuB. Lens' (IpeFile r_aYuB) (Maybe IpePreamble)
- Data.Geometry.Ipe.Types: rect :: forall r_a13EG r_a13KH. Lens (Image r_a13EG) (Image r_a13KH) (Rectangle () r_a13EG) (Rectangle () r_a13KH)
+ Data.Geometry.Ipe.Types: rect :: forall r_aL7l r_aLf6. Lens (Image r_aL7l) (Image r_aLf6) (Rectangle () r_aL7l) (Rectangle () r_aLf6)
- Data.Geometry.Ipe.Types: styles :: forall r_a1hsw. Lens' (IpeFile r_a1hsw) [IpeStyle]
+ Data.Geometry.Ipe.Types: styles :: forall r_aYuB. Lens' (IpeFile r_aYuB) [IpeStyle]
- Data.Geometry.Ipe.Types: symbolName :: forall r_a13L1. Lens' (IpeSymbol r_a13L1) Text
+ Data.Geometry.Ipe.Types: symbolName :: forall r_aLfq. Lens' (IpeSymbol r_aLfq) Text
- Data.Geometry.Ipe.Types: symbolPoint :: forall r_a13L1 r_a14xB. Lens (IpeSymbol r_a13L1) (IpeSymbol r_a14xB) (Point 2 r_a13L1) (Point 2 r_a14xB)
+ Data.Geometry.Ipe.Types: symbolPoint :: forall r_aLfq r_aM1h. Lens (IpeSymbol r_aLfq) (IpeSymbol r_aM1h) (Point 2 r_aLfq) (Point 2 r_aM1h)
- Data.Geometry.Ipe.Types: views :: forall r_a1hoe. Lens' (IpePage r_a1hoe) [View]
+ Data.Geometry.Ipe.Types: views :: forall r_aYqu. Lens' (IpePage r_aYqu) [View]
Files
- hgeometry-ipe.cabal +17/−7
- src/Data/Geometry/Ipe/Content.hs +1/−1
- src/Data/Geometry/Ipe/FromIpe.hs +9/−8
- src/Data/Geometry/Ipe/IpeOut.hs +52/−13
- src/Data/Geometry/Ipe/Reader.hs +22/−13
- src/Data/Geometry/Ipe/Writer.hs +24/−23
- src/Data/Geometry/QuadTree/Draw.hs +0/−3
- src/Data/Geometry/Triangulation/Draw.hs +1/−1
hgeometry-ipe.cabal view
@@ -1,5 +1,5 @@ name: hgeometry-ipe-version: 0.11.0.0+version: 0.12.0.0 synopsis: Reading and Writing ipe7 files. description: Reading and Writing ipe7 files and converting them to and from HGeometry types.@@ -83,7 +83,6 @@ , linear >= 1.10 , semigroupoids >= 5 , semigroups >= 0.18- , singletons >= 2.0 , text >= 1.1.1.0 , vinyl >= 0.10 , deepseq >= 1.1@@ -94,8 +93,8 @@ , QuickCheck >= 2.5 , quickcheck-instances >= 0.3 - , hgeometry-combinatorial >= 0.11.0.0- , hgeometry >= 0.11.0.0+ , hgeometry-combinatorial >= 0.12.0.0+ , hgeometry >= 0.12.0.0 -- , validation >= 0.4 @@ -117,12 +116,20 @@ -- , hslua + if impl(ghc == 9.*)+ build-depends: singletons == 3.*+ , singletons-th == 3.*+ else+ build-depends: singletons == 2.* hs-source-dirs: src -- examples/demo default-language: Haskell2010 + if impl(ghc >= 8.10)+ default-extensions: StandaloneKindSignatures+ default-extensions: TypeFamilies , GADTs , KindSignatures@@ -181,13 +188,18 @@ , vector , containers , random- , singletons , colour , filepath , directory , yaml , MonadRandom + if impl(ghc == 9.*)+ build-depends: singletons == 3.*+ , singletons-th == 3.*+ else+ build-depends: singletons == 2.*+ default-extensions: TypeFamilies , GADTs , KindSignatures@@ -211,8 +223,6 @@ , DeriveFunctor , DeriveFoldable , DeriveTraversable-- , AutoDeriveTypeable , FlexibleInstances , FlexibleContexts
src/Data/Geometry/Ipe/Content.hs view
@@ -211,7 +211,7 @@ transformBy t (Group s) = Group $ fmap (transformBy t) s -type family AttributesOf (t :: * -> *) :: [u] where+type family AttributesOf (t :: * -> *) :: [AttributeUniverse] where AttributesOf Group = GroupAttributes AttributesOf Image = CommonAttributes AttributesOf TextLabel = CommonAttributes
src/Data/Geometry/Ipe/FromIpe.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE ScopedTypeVariables #-} -------------------------------------------------------------------------------- -- | -- Module : Data.Geometry.Ipe.FromIpe@@ -105,7 +106,7 @@ pathToRect p = p^?_asSimplePolygon >>= asRect asRect :: SimplePolygon () r -> Maybe (Rectangle () r)- asRect pg = case pg^..outerBoundary.traverse of+ asRect pg = case pg^..outerBoundaryVector.traverse of [a,b,c,d] | isH a b && isV b c && isH c d && isV d a -> Just (boundingBoxList' [a,c]) [a,b,c,d] | isV a b && isH b c && isV c d && isH d a -> Just (boundingBoxList' [a,c]) _ -> Nothing@@ -118,7 +119,7 @@ _asTriangle :: Prism' (Path r) (Triangle 2 () r) _asTriangle = prism' triToPath path2tri where- triToPath (Triangle p q r) = polygonToPath . fromPoints . map (&extra .~ ()) $ [p,q,r]+ triToPath (Triangle p q r) = polygonToPath . unsafeFromPoints . map (&extra .~ ()) $ [p,q,r] path2tri p = case p^..pathSegments.traverse._PolygonPath of [] -> Nothing [pg] -> case polygonVertices pg of@@ -162,16 +163,16 @@ polygonToPath :: Polygon t () r -> Path r-polygonToPath pg@(SimplePolygon _) = Path . fromSingleton . PolygonPath $ pg+polygonToPath pg@SimplePolygon{} = Path . fromSingleton . PolygonPath $ pg polygonToPath (MultiPolygon vs hs) = Path . LSeq.fromNonEmpty . fmap PolygonPath- $ (SimplePolygon vs) :| hs+ $ vs :| hs pathToPolygon :: Path r -> Maybe (Either (SimplePolygon () r) (MultiPolygon () r)) pathToPolygon p = case p^..pathSegments.traverse._PolygonPath of- [] -> Nothing- [pg] -> Just . Left $ pg- SimplePolygon vs: hs -> Just . Right $ MultiPolygon vs hs+ [] -> Nothing+ [pg] -> Just . Left $ pg+ vs:hs -> Just . Right $ MultiPolygon vs hs @@ -249,7 +250,7 @@ -- | Read all g's from some ipe page(s).-readAll :: (HasDefaultFromIpe g, r ~ NumType g)+readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r] readAll p = p^..content.traverse.defaultFromIpe
src/Data/Geometry/Ipe/IpeOut.hs view
@@ -22,10 +22,10 @@ import Data.Ext import Data.Foldable (toList) import Data.Geometry.Ball-import Data.Geometry.Ellipse(Ellipse, circleToEllipse)-import Data.Geometry.BezierSpline import Data.Geometry.Boundary import Data.Geometry.Box+import Data.Geometry.Ellipse (Ellipse, circleToEllipse)+import Data.Geometry.HalfLine import Data.Geometry.Ipe.Attributes import Data.Geometry.Ipe.Color (IpeColor(..)) import Data.Geometry.Ipe.FromIpe@@ -42,6 +42,7 @@ import Data.Maybe (fromMaybe) import Data.Text (Text) import qualified Data.Text as Text+import Data.Vinyl (Rec(..)) import Data.Vinyl.CoRec import Linear.Affine ((.+^)) @@ -137,14 +138,12 @@ instance (Fractional r, Ord r) => HasDefaultIpeOut (Line 2 r) where type DefaultIpeOut (Line 2 r) = Path- defIO = ipeLineSegment . toSeg- where- b :: Rectangle () r- b = box (ext $ Point2 (-200) (-200)) (ext $ Point2 1200 1200)- naive (Line p v) = ClosedLineSegment (ext p) (ext $ p .+^ v)- toSeg l = fromMaybe (naive l) . asA @(LineSegment 2 () r)- $ l `intersect` b+ defIO = ipeLine +instance (Fractional r, Ord r) => HasDefaultIpeOut (HalfLine 2 r) where+ type DefaultIpeOut (HalfLine 2 r) = Path+ defIO = ipeHalfLine+ instance HasDefaultIpeOut (Polygon t p r) where type DefaultIpeOut (Polygon t p r) = Path defIO = ipePolygon@@ -185,6 +184,46 @@ -------------------------------------------------------------------------------- -- * Path Converters +-- | Size of the default bounding box used to clip lines and+-- half-lines in the default IpeOuts.+defaultBox :: Num r => Rectangle () r+defaultBox = let z = 1000+ z' = negate z+ in box (ext $ Point2 z' z') (ext $ Point2 z z)++-- | Renders a line as a Path. The line is clipped to the 'defaultBox'+ipeLine :: (Ord r, Fractional r) => IpeOut (Line 2 r) Path r+ipeLine = ipeLineIn defaultBox++-- | Renders the line in the given box.+--+-- pre: the intersection of the box with the line is non-empty+ipeLineIn :: forall p r. (Ord r, Fractional r)+ => Rectangle p r -> IpeOut (Line 2 r) Path r+ipeLineIn bBox l = match (l `intersect` bBox) $+ H (\NoIntersection -> error "ipeLineIn: precondition failed, no intersection")+ :& H (\(_p :: Point 2 r) -> error "ipeLineIn: precondition failed, single point")+ :& H ipeLineSegment+ :& RNil++-- | Renders an Halfine.+--+--+-- pre: the intersection of the box with the line is non-empty+ipeHalfLine :: (Ord r, Fractional r) => IpeOut (HalfLine 2 r) Path r+ipeHalfLine = ipeHalfLineIn defaultBox++-- | Renders the HalfLine in the given box.+--+-- pre: the intersection of the box with the line is non-empty+ipeHalfLineIn :: forall p r. (Ord r, Fractional r)+ => Rectangle p r -> IpeOut (HalfLine 2 r) Path r+ipeHalfLineIn bBox l = match (l `intersect` bBox) $+ H (\NoIntersection -> error "ipeHalfLineIn: precondition failed, no intersection")+ :& H (\(_p :: Point 2 r) -> error "ipeHalfLineIn: precondition failed, single point")+ :& H ipeLineSegment+ :& RNil+ ipeLineSegment :: IpeOut (LineSegment 2 p r) Path r ipeLineSegment s = (path . pathSegment $ s) :+ mempty @@ -192,7 +231,7 @@ ipePolyLine p = (path . PolyLineSegment . first (const ()) $ p) :+ mempty ipeEllipse :: IpeOut (Ellipse r) Path r-ipeEllipse = \e -> (path $ EllipseSegment e) :+ mempty+ipeEllipse = \e -> path (EllipseSegment e) :+ mempty ipeCircle :: Floating r => IpeOut (Circle p r) Path r ipeCircle = ipeEllipse . circleToEllipse@@ -210,13 +249,13 @@ -- | Draw a polygon ipePolygon :: IpeOut (Polygon t p r) Path r ipePolygon (first (const ()) -> pg) = case pg of- (SimplePolygon _) -> pg^.re _asSimplePolygon :+ mempty- (MultiPolygon _ _) -> pg^.re _asMultiPolygon :+ mempty+ SimplePolygon{} -> pg^.re _asSimplePolygon :+ mempty+ MultiPolygon{} -> pg^.re _asMultiPolygon :+ mempty -- | Draw a Rectangle ipeRectangle :: Num r => IpeOut (Rectangle p r) Path r-ipeRectangle r = ipePolygon $ fromPoints [tl,tr,br,bl]+ipeRectangle r = ipePolygon $ unsafeFromPoints [tl,tr,br,bl] where Corners tl tr br bl = corners r
src/Data/Geometry/Ipe/Reader.hs view
@@ -5,6 +5,7 @@ readRawIpeFile , readIpeFile , readSinglePageFile+ , readSinglePageFileThrow , ConversionError -- * Reading XML directly@@ -26,32 +27,33 @@ , Coordinate(..) ) where -import Control.Applicative((<|>))+import Control.Applicative ((<|>)) import Control.Lens hiding (Const, rmap)+import Data.Bifunctor import qualified Data.ByteString as B import Data.Colour.SRGB (RGB(..)) import Data.Either (rights) import Data.Ext-import Data.Geometry.Box import Data.Geometry.BezierSpline-import Data.Geometry.Ellipse(ellipseMatrix)+import Data.Geometry.Box+import Data.Geometry.Ellipse (ellipseMatrix) import Data.Geometry.Ipe.Attributes+import Data.Geometry.Ipe.Color (IpeColor(..))+import Data.Geometry.Ipe.Matrix import Data.Geometry.Ipe.ParserPrimitives (pInteger, pWhiteSpace)-import Data.Geometry.Ipe.PathParser import Data.Geometry.Ipe.Path-import Data.Geometry.Ipe.Matrix+import Data.Geometry.Ipe.PathParser import Data.Geometry.Ipe.Types import Data.Geometry.Ipe.Value-import Data.Geometry.Ipe.Color(IpeColor(..))+import qualified Data.Geometry.Matrix as Matrix import Data.Geometry.Point import Data.Geometry.PolyLine import qualified Data.Geometry.Polygon as Polygon-import qualified Data.Geometry.Matrix as Matrix+import qualified Data.LSeq as LSeq import qualified Data.List as L import qualified Data.List.NonEmpty as NonEmpty import Data.Maybe (fromMaybe, mapMaybe) import Data.Proxy-import qualified Data.LSeq as LSeq import Data.Singletons import Data.Text (Text) import qualified Data.Text as T@@ -78,7 +80,7 @@ -- This function applies all matrices to objects. readIpeFile :: (Coordinate r, Eq r) => FilePath -> IO (Either ConversionError (IpeFile r))-readIpeFile = fmap (bimap id applyMatrices) . readRawIpeFile+readIpeFile = fmap (second applyMatrices) . readRawIpeFile -- | Since most Ipe file contain only one page, we provide a shortcut for that@@ -94,6 +96,13 @@ f :: IpeFile r -> IpePage r f i = withDefaults . NonEmpty.head $ i^.pages +-- | Tries to read a single page file, throws an error when this+-- fails. See 'readSinglePageFile' for further details.+readSinglePageFileThrow :: (Coordinate r, Eq r) => FilePath -> IO (IpePage r)+readSinglePageFileThrow fp = readSinglePageFile fp >>= \case+ Left err -> fail (show err)+ Right p -> pure p+ -- | Given a Bytestring, try to parse the bytestring into anything that is -- IpeReadable, i.e. any of the Ipe elements. fromIpeXML :: IpeRead (t r) => B.ByteString -> Either ConversionError (t r)@@ -101,7 +110,7 @@ -- | Reads the data from a Bytestring into a proper Node readXML :: B.ByteString -> Either ConversionError (Node Text Text)-readXML = bimap (T.pack . show) id . parse' defaultParseOptions+readXML = first (T.pack . show) . parse' defaultParseOptions -------------------------------------------------------------------------------- @@ -205,7 +214,7 @@ fromOps' _ [] = Left "Found only a MoveTo operation" fromOps' s (LineTo q:ops) = let (ls,xs) = span' _LineTo ops pts = map ext $ s:q:mapMaybe (^?_LineTo) ls- poly = Polygon.fromPoints . dropRepeats $ pts+ poly = Polygon.unsafeFromPoints . dropRepeats $ pts pl = fromPointsUnsafe pts in case xs of (ClosePath : xs') -> PolygonPath poly <<| xs'@@ -242,8 +251,8 @@ ipeReadAttr _ _ = Left "IpeReadAttr: Element expected, Text found" -- | Combination of zipRecWith and traverse-zipTraverseWith :: forall f g h i (rs :: [u]). Applicative h- => (forall (x :: u). f x -> g x -> h (i x))+zipTraverseWith :: forall f g h i (rs :: [AttributeUniverse]). Applicative h+ => (forall (x :: AttributeUniverse). f x -> g x -> h (i x)) -> Rec f rs -> Rec g rs -> h (Rec i rs) zipTraverseWith _ RNil RNil = pure RNil zipTraverseWith f (x :& xs) (y :& ys) = (:&) <$> f x y <*> zipTraverseWith f xs ys
src/Data/Geometry/Ipe/Writer.hs view
@@ -1,5 +1,5 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} -------------------------------------------------------------------------------- -- |@@ -22,41 +22,42 @@ , ipeWriteAttrs, writeAttrValues ) where -import Control.Lens (view, (^.), (^..), (.~), (&))-import qualified Data.ByteString as B-import qualified Data.ByteString.Char8 as C-import Data.Colour.SRGB (RGB(..))+import Control.Lens (view, (&), (.~), (^.), (^..))+import qualified Data.ByteString as B+import qualified Data.ByteString.Char8 as C+import Data.Colour.SRGB (RGB (..)) import Data.Ext import Data.Fixed-import qualified Data.Foldable as F+import qualified Data.Foldable as F+import Data.Geometry.BezierSpline import Data.Geometry.Box-import Data.Geometry.Ellipse(ellipseMatrix)+import Data.Geometry.Ellipse (ellipseMatrix) import Data.Geometry.Ipe.Attributes import qualified Data.Geometry.Ipe.Attributes as IA-import Data.Geometry.Ipe.Color (IpeColor(..))-import Data.Geometry.Ipe.Types+import Data.Geometry.Ipe.Color (IpeColor (..)) import Data.Geometry.Ipe.Path+import Data.Geometry.Ipe.Types import Data.Geometry.Ipe.Value import Data.Geometry.LineSegment+import qualified Data.Geometry.Matrix as Matrix import Data.Geometry.Point-import Data.Geometry.BezierSpline import Data.Geometry.PolyLine-import Data.Geometry.Polygon (Polygon, outerBoundary, holeList, asSimplePolygon)-import qualified Data.Geometry.Matrix as Matrix+import Data.Geometry.Polygon (Polygon, holeList, outerBoundary,+ outerBoundaryVector) import Data.Geometry.Vector-import qualified Data.LSeq as LSeq-import Data.List.NonEmpty (NonEmpty(..))-import Data.Maybe (catMaybes, mapMaybe, fromMaybe)+import qualified Data.LSeq as LSeq+import Data.List.NonEmpty (NonEmpty (..))+import Data.Maybe (catMaybes, fromMaybe, mapMaybe) import Data.Ratio import Data.RealNumber.Rational import Data.Singletons-import Data.Text (Text)-import qualified Data.Text as Text-import Data.Vinyl hiding (Label)+import Data.Text (Text)+import qualified Data.Text as Text+import Data.Vinyl hiding (Label) import Data.Vinyl.Functor import Data.Vinyl.TypeLevel-import System.IO (hPutStrLn,stderr)-import Text.XML.Expat.Format (format')+import System.IO (hPutStrLn, stderr)+import Text.XML.Expat.Format (format') import Text.XML.Expat.Tree --------------------------------------------------------------------------------@@ -297,9 +298,9 @@ -- the polyline type guarantees that there is at least one point instance IpeWriteText r => IpeWriteText (Polygon t () r) where- ipeWriteText pg = fmap mconcat . traverse f $ asSimplePolygon pg : holeList pg+ ipeWriteText pg = fmap mconcat . traverse f $ pg^.outerBoundary : holeList pg where- f pg' = case pg'^..outerBoundary.traverse.core of+ f pg' = case pg'^..outerBoundaryVector.traverse.core of (p : rest) -> unlines' . map ipeWriteText $ MoveTo p : map LineTo rest ++ [ClosePath] _ -> Nothing
src/Data/Geometry/QuadTree/Draw.hs view
@@ -9,11 +9,8 @@ import Data.Geometry.Ipe.Types import Data.Geometry.QuadTree import Data.Geometry.QuadTree.Cell-import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.Text as T import Data.Tree.Util (TreeNode(..))-import Data.Vinyl.Notation-import Data.Vinyl.Core -------------------------------------------------------------------------------- drawCell :: Fractional r => IpeOut (Cell r) Path r
src/Data/Geometry/Triangulation/Draw.hs view
@@ -10,5 +10,5 @@ drawTriangulation :: IpeOut (Triangulation p r) Group r drawTriangulation tr = ipeGroup [ iO $ ipeLineSegment e- | e <- map (uncurry ClosedLineSegment) . triangulationEdges $ tr+ | e <- map (uncurry ClosedLineSegment) . edgesAsPoints $ tr ]